Module / v1.0.0-beta.7

@typed/ui/TreeGrid

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

Learn this UI primitive →

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

Cell registration

  • CellPosition

    interface

    Logical coordinates stored with each registered TreeGrid cell.

  • makeCollection

    variable

    Creates a scoped Collection for TreeGrid items.

Child row visibility

  • Group

    function

    Renders a rowgroup and hides it while its parent row is collapsed.

  • GroupOptions

    interface

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

Hierarchical rows

  • Row

    function

    Renders a hierarchical row with level and optional expanded state.

  • RowOptions

    interface

    Inputs accepted by TreeGrid.Row in addition to the shared DOM host options.

Hierarchy and cell focus

  • InitialState

    type-alias

    Initial TreeGrid values. Uses Tree state and defaults.

  • State

    type-alias

    Tree expansion state reused for a grid whose active ID names a cell. expandedIds names parent rows, while activeId names the active cell within a row.

  • StateSchema

    variable

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

  • activate

    variable

    Sets the active TreeGrid row or cell id without changing expansion.

  • makeState

    variable

    Creates hydrated TreeGrid state. Uses Tree state and defaults.

Navigable cells

  • Cell

    function

    Renders and optionally registers one gridcell with row and column coordinates.

  • CellOptions

    interface

    Inputs accepted by TreeGrid.Cell in addition to the shared DOM host options.

Row expansion

  • collapse

    variable

    Removes a row id from expandedIds using the Tree state transition.

  • expand

    variable

    Adds a row id once to expandedIds using the Tree state transition.

  • isExpanded

    variable

    Tests membership in expandedIds without touching the DOM; this is the Tree helper exposed from the TreeGrid entrypoint.

Treegrid surface

  • Root

    function

    Renders the focus-owning treegrid root and applies combined grid and expansion keys.

  • RootOptions

    interface

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