@yarcl/react
    Preparing search index...

    Interface TreeViewItem<V>

    A uniquely identified node in a TreeView. Labels should contain noninteractive content.

    interface TreeViewItem<V extends string = string> {
        children?: readonly TreeViewItem<V>[];
        disabled?: boolean;
        icon?: ReactNode;
        id: V;
        label: ReactNode;
        selectable?: boolean;
        textValue?: string;
    }

    Type Parameters

    • V extends string = string
    Index
    children?: readonly TreeViewItem<V>[]

    Nested nodes. An empty array makes this a leaf.

    disabled?: boolean

    Prevents selection and expansion while keeping the item discoverable by keyboard.

    icon?: ReactNode

    Decorative icon displayed before the label.

    id: V

    Stable, unique identifier across the entire tree.

    label: ReactNode

    Visible accessible label.

    selectable?: boolean

    Allows focus and expansion without selection.

    true
    
    textValue?: string

    Plain text for type-ahead when the label contains rich content.