sigilUI

Tree View

Browse hierarchical items with expandable branches.

@sigil-ui/componentsReact

Preview

Live preview Interactive

Import

import { TreeView } from "@sigil-ui/components";

Usage

<TreeView
    defaultExpanded={["src"]}
    data={[{ id: "src", label: "src", children: [{ id: "components", label: "components" }, { id: "utils", label: "utils" }] }]}
  />

Props

PropTypeDefaultDescription
data (required)TreeNode[]—Data used to render the visualization.
defaultExpandedstring[]—Default Expanded configuration.
onSelect(id: string) => void—On Select configuration.
selectedIdstring—Selected Id configuration.

Token integration

CSS VariablePurpose
--s-radius-smRadius sm
--s-textText
--s-duration-fastDuration fast
--s-surfaceSurface
--s-primaryPrimary
--s-text-mutedText muted