Module / v1.0.0-beta.7

@typed/ui/Tree

16 unique exports available through this public import path, including their members and aliases.

Learn this UI primitive →

import * as Tree from "@typed/ui/Tree";

Child visibility

  • Group

    function

    Renders a child group and hides it while its parent id is not expanded.

  • GroupOptions

    interface

    Inputs accepted by Tree.Group in addition to the shared DOM host options.

Expansion

  • collapse

    function

    Removes an id from expandedIds.

  • expand

    function

    Adds an id once to expandedIds.

  • isExpanded

    function

    Tests membership in expandedIds without touching the DOM.

Hierarchy state

  • InitialState

    interface

    Initial Tree values. activeId defaults null and expandedIds defaults empty.

  • State

    interface

    The focused node and expanded parent identities. Expansion controls visible traversal; file selection or opening is a separate application action.

  • StateSchema

    variable

    Effect Schema used by makeState to encode, decode, and hydrate Tree state.

  • makeState

    function

    Creates hydrated Tree state. activeId defaults null and expandedIds defaults empty.

Node focus

  • activate

    function

    Sets the active tree item id without changing expansion.

Node registration

  • ItemValue

    interface

    Tree collection value recording an item’s parent relationship.

  • makeCollection

    variable

    Creates a scoped Collection for Tree items.

Tree nodes

  • Item

    function

    Renders and optionally registers a treeitem with level, expanded, disabled, and roving-focus state.

  • ItemOptions

    interface

    Inputs accepted by Tree.Item in addition to the shared DOM host options.

Tree surface

  • Root

    function

    Renders the tree root and applies hierarchy-aware keyboard navigation to registered items.

  • RootOptions

    interface

    Inputs accepted by Tree.Root in addition to the shared DOM host options.