For AI agents: the complete documentation index is available at https://rickyshin93.github.io/tao-ui/llms.txt, the full documentation bundle is available at https://rickyshin93.github.io/tao-ui/llms-full.txt, and this page is available as Markdown at https://rickyshin93.github.io/tao-ui/components/tree.md.
v0.0.57
  • English
  • Tree

    Data Display@rockshin/tao-ui

    Hierarchical data with selection, checkboxes, async children, dragging and virtual scrolling.

    Each example can be copied and run independently. Use the device control on framed previews to switch between desktop and phone widths.

    Examples

    Expand and select

    Use stable keys for nodes. Arrow keys navigate the tree; Enter selects the active node.

    Workspace
    TSX

    Controlled checks

    Checking a parent includes its enabled descendants. Keep the returned keys in state.

    Workspace
    Design
    tokens.json
    Engineering
    README.md
    Checked: tokens
    TSX

    Independent and disabled checks

    checkStrictly separates parent and child checks. disabled and disableCheckbox have different scopes.

    Independent parent
    Selectable child
    Checkbox disabled
    Entire node disabled
    TSX

    Directory tree

    DirectoryTree adds folder/file icons and familiar range or modifier-key selection when multiple is enabled.

    Workspace
    Design
    tokens.json
    Engineering
    README.md
    TSX

    Custom titles and semantics

    titleRender decorates content without changing node keys. Semantic styles target the real title slot.

    Workspace
    Design
    tokens.jsonfile
    Engineering
    README.mdfile
    TSX

    Load children on demand

    This local example simulates a delayed result. Resolve loadData after updating the parent node.

    TSX

    Virtual list and scrollTo

    A bounded height enables virtual rendering. The ref scrolls to a key even when its row is outside the viewport.

    Document 1
    Document 2
    Document 3
    Document 4
    Document 5
    Document 6
    Document 7
    Document 8
    TSX

    Reorder a flat tree

    This example allows drops between rows and stores the new order. Nested moves can use the same onDrop contract.

    Inbox
    In review
    Published
    TSX

    Tree in a narrow pane

    Use the phone preview to expand and check nodes within a bounded scroller.

    390 × 640
    TSX

    API

    BasicDataNode

    For fieldNames, we provides a abstract interface

    PropertyDescriptionTypeDefault Value

    DirectoryTree

    PropertyDescriptionTypeDefault Value
    rootStyle@deprecated Use styles.root.CSSProperties | undefined-
    filterAntTreeNode@deprecated Use filterTreeNode.((treeNode: EventDataNode<T>) => boolean) | undefined-

    Tree

    PropertyDescriptionTypeDefault Value
    rootStyle@deprecated Use styles.root.CSSProperties | undefined-
    filterAntTreeNode@deprecated Use filterTreeNode.((treeNode: EventDataNode<T>) => boolean) | undefined-