Tree
Installation
npx shadcn@latest add https://ui.timkit.cn/r/tree.json
Usage
import { Tree } from "@/components/ui/tree"
Examples
Tree · Interactive State
Loading preview...
Tree · Interactive State
Loading preview...
Tree · Interactive State
Loading preview...
Tree · Interactive State
Loading preview...
Tree · Interactive State
Loading preview...
Tree · Interactive State
Loading preview...
Tree · Disabled State
Loading preview...
Tree · Clear search
Loading preview...
Tree · Interactive State
Loading preview...
Tree · Interactive State
Loading preview...
Tree · Interactive State
Loading preview...
Tree · Interactive State
Loading preview...
Structured API
Component
tree
Logic
none
Runtime Frameworks
ReactVueWeappHTML
Supported Platforms
Web
Configuration
| Prop | Type | Default | Description |
|---|---|---|---|
| logic.provider* | enum (zag | native | none) | none | State and interaction provider used by this component. |
| logic.machine | string | - | Underlying state machine identifier when provider is zag. |
| platforms* | array | Web | Platforms officially supported by this schema. |
| frameworks* | array | React, Vue, Weapp, HTML | Framework demos/code currently available in registry files. |
| dependencies | array | @headless-tree/core, @timui/core | Runtime package dependencies required by this registry item. |
| optionalPeerDependencies | array | lucide-react | Optional peer dependencies used by this registry item. |
| registryDependencies | array | - | Dependent Timkit registry components/hook entries. |
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| indent | number | 20 | The indentation for children. |
Slots
| Prop | Type | Default | Description |
|---|---|---|---|
| default | slot | - | The tree items |
Parts
| Prop | Type | Default | Description |
|---|---|---|---|
| root* | root | - | The tree container |
| item | part | - | A tree node |
| label | part | - | A node label |
| dragLine | part | - | The drag indicator |
This API reference is generated from `/packages/core` component schemas to keep React/Vue/Weapp docs consistent.
Extended notes are not available for this component yet.
On This Page
- Installation
- Usage
- Examples
- Tree · Interactive State
- Tree · Interactive State
- Tree · Interactive State
- Tree · Interactive State
- Tree · Interactive State
- Tree · Interactive State
- Tree · Disabled State
- Tree · Clear search
- Tree · Interactive State
- Tree · Interactive State
- Tree · Interactive State
- Tree · Interactive State
- Navbar · Interactive State
- API Reference
Tree
Installation
npx shadcn@latest add https://ui.timkit.cn/r/tree.json
Usage
import { Tree } from "@/components/ui/tree"
Examples
Tree · Interactive State
Loading preview...
Tree · Interactive State
Loading preview...
Tree · Interactive State
Loading preview...
Tree · Interactive State
Loading preview...
Tree · Interactive State
Loading preview...
Tree · Interactive State
Loading preview...
Tree · Disabled State
Loading preview...
Tree · Clear search
Loading preview...
Tree · Interactive State
Loading preview...
Tree · Interactive State
Loading preview...
Tree · Interactive State
Loading preview...
Tree · Interactive State
Loading preview...
Structured API
Component
tree
Logic
none
Runtime Frameworks
ReactVueWeappHTML
Supported Platforms
Web
Configuration
| Prop | Type | Default | Description |
|---|---|---|---|
| logic.provider* | enum (zag | native | none) | none | State and interaction provider used by this component. |
| logic.machine | string | - | Underlying state machine identifier when provider is zag. |
| platforms* | array | Web | Platforms officially supported by this schema. |
| frameworks* | array | React, Vue, Weapp, HTML | Framework demos/code currently available in registry files. |
| dependencies | array | @headless-tree/core, @timui/core | Runtime package dependencies required by this registry item. |
| optionalPeerDependencies | array | lucide-react | Optional peer dependencies used by this registry item. |
| registryDependencies | array | - | Dependent Timkit registry components/hook entries. |
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| indent | number | 20 | The indentation for children. |
Slots
| Prop | Type | Default | Description |
|---|---|---|---|
| default | slot | - | The tree items |
Parts
| Prop | Type | Default | Description |
|---|---|---|---|
| root* | root | - | The tree container |
| item | part | - | A tree node |
| label | part | - | A node label |
| dragLine | part | - | The drag indicator |
This API reference is generated from `/packages/core` component schemas to keep React/Vue/Weapp docs consistent.
Extended notes are not available for this component yet.
On This Page
- Installation
- Usage
- Examples
- Tree · Interactive State
- Tree · Interactive State
- Tree · Interactive State
- Tree · Interactive State
- Tree · Interactive State
- Tree · Interactive State
- Tree · Disabled State
- Tree · Clear search
- Tree · Interactive State
- Tree · Interactive State
- Tree · Interactive State
- Tree · Interactive State
- Navbar · Interactive State
- API Reference