BetaBeta pública — Consulta las notas de lanzamiento
Documentación

Tree

Hierarchical tree view with expand/collapse.

Paquete
@solidiom/tree
Versión
0.0.1-next.0
Estado
stable

Generado a partir del código fuente público del paquete.

API

Branchcomponente

@solidiom/tree — Headless tree view primitive. Parts: Root, Item, Branch, ItemIndicator.

                        Branch(props: TreeBranchProps): Element
                      

Propiedades

class?
string

hijos: Element

Ver código fuente

Itemcomponente

@solidiom/tree — Headless tree view primitive. Parts: Root, Item, Branch, ItemIndicator.

                        Item(props: TreeItemProps): Element
                      

Propiedades

class?
string
disabled?
boolean — Whether this item is disabled.
id
string — Unique ID for this item.
ref?
(el: HTMLDivElement) => void
textValue?
string — Text value for typeahead matching.

hijos: Element

Ver código fuente

ItemIndicatorcomponente

@solidiom/tree — Headless tree view primitive. Parts: Root, Item, Branch, ItemIndicator.

                        ItemIndicator(props: TreeItemIndicatorProps): Element
                      

Propiedades

class?
string

hijos: Element

Ver código fuente

Rootcomponente

@solidiom/tree — Headless tree view primitive. Parts: Root, Item, Branch, ItemIndicator.

                        Root(props: TreeRootProps): Element
                      

Propiedades

class?
string
defaultExpandedIds?
Set<string> — Default expanded IDs for uncontrolled mode.
defaultSelectedIds?
Set<string> — Default selected IDs for uncontrolled mode.
expandedIds?
Accessor<Set<string>> — Controlled expanded IDs.
onExpandedChange?
(ids: Set<string>, details: ChangeDetails<TreeReason>) => void — Called when expanded IDs change.
onSelectedChange?
(ids: Set<string>, details: ChangeDetails<TreeReason>) => void — Called when selected IDs change.
ref?
(el: HTMLDivElement) => void
selectedIds?
Accessor<Set<string>> — Controlled selected IDs.
selectionMode?
SelectionMode — Selection mode: "single" (default) or "multiple".

hijos: Element

Ver código fuente

SelectionModetipo

Selection mode for the tree.

Ver código fuente

TreeBranchPropsinterfaz

Props for a tree branch (group of nested items).

Propiedades

class?
string

hijos: Element

Ver código fuente

TreeContextValueinterfaz

Propiedades

baseId
string — Generated base ID.
expandedIds
Accessor<Set<string>> — Set of currently expanded item IDs.
focusedId
Accessor<string | null> — Currently focused item ID.
registerItem
(item: TreeItemEntry) => () => void — Register a visible tree item for focus management. Returns cleanup.
requestExpandedChange
(ids: Set<string>, details: ChangeDetails<TreeReason>) => void — Request expansion state change.
requestSelectedChange
(ids: Set<string>, details: ChangeDetails<TreeReason>) => void — Request selection state change.
selectedIds
Accessor<Set<string>> — Set of currently selected item IDs.
selectionMode
SelectionMode — Selection mode.
setFocusedId
(id: string | null) => void — Set focus to an item by ID.
typeahead
Typeahead — Typeahead instance for character navigation.
visibleItems
Accessor<TreeItemEntry[]> — All registered visible items in DOM order.

Ver código fuente

TreeItemEntryinterfaz

Registration entry for a tree item.

Propiedades

depth
number
disabled
boolean
id
string
parentId
string | null
ref?
HTMLElement
textValue
string

Ver código fuente

TreeItemIndicatorPropsinterfaz

Props for the tree item expand/collapse indicator.

Propiedades

class?
string

hijos: Element

Ver código fuente

TreeItemPropsinterfaz

Props for a tree item.

Propiedades

class?
string
disabled?
boolean — Whether this item is disabled.
id
string — Unique ID for this item.
ref?
(el: HTMLDivElement) => void
textValue?
string — Text value for typeahead matching.

hijos: Element

Ver código fuente

TreeReasontipo

Reason for a tree state change.

Ver código fuente

TreeRootPropsinterfaz

@solidiom/tree — Headless tree view primitive. Parts: Root, Item, Branch, ItemIndicator.

Propiedades

class?
string
defaultExpandedIds?
Set<string> — Default expanded IDs for uncontrolled mode.
defaultSelectedIds?
Set<string> — Default selected IDs for uncontrolled mode.
expandedIds?
Accessor<Set<string>> — Controlled expanded IDs.
onExpandedChange?
(ids: Set<string>, details: ChangeDetails<TreeReason>) => void — Called when expanded IDs change.
onSelectedChange?
(ids: Set<string>, details: ChangeDetails<TreeReason>) => void — Called when selected IDs change.
ref?
(el: HTMLDivElement) => void
selectedIds?
Accessor<Set<string>> — Controlled selected IDs.
selectionMode?
SelectionMode — Selection mode: "single" (default) or "multiple".

hijos: Element

Ver código fuente