Tree Diagram
Show hierarchical relationships as a branching diagram.
Preview
Import
import { TreeDiagram } from "@sigil-ui/components";Usage
<TreeDiagram
root={{
id: "root",
label: "App",
variant: "accent",
children: [
{ id: "api", label: "API", children: [
{ id: "auth", label: "Auth" },
{ id: "db", label: "Database" },
]},
{ id: "ui", label: "Frontend" },
],
}}
/>Props
| Prop | Type | Default | Description |
|---|---|---|---|
root (required) | TreeDiagramNode | — | Root configuration. |
connector | "solid" | "dashed" | — | Connector configuration. |
compact | boolean | — | Compact configuration. |
Token integration
| CSS Variable | Purpose |
|---|---|
--s-border | Border |
--s-surface | Surface |
--s-text | Text |
--s-primary | Primary |
--s-primary-muted | Primary muted |
--s-primary-contrast | Primary contrast |
--s-border-muted | Border muted |
--s-text-muted | Text muted |
--s-radius-md | Radius md |