Component packs › Flaps › Tree View
Folders swing open on a hinge while the branch line grows down beside the children and their elbows draw out.
Tree View is a tree from Flaps, a component pack with 6 disclosure components: Accordions, trees and sidebars whose panels swing open on a real hinge. Price: $2 for the whole pack.
Built with: growing branch lines, full tree keyboard, nested hinges.
Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.
| Prop | Type | Default | Description |
|---|---|---|---|
nodes | TreeNode[] | ||
label | string | ||
dark | boolean | follows the page | Force the dark (true) or light (false) look. Default: follows the page. |
onSelect | (path: string) => void | ||
autoplay | number | false | Showcase mode: opens or closes a folder every N ms while visible. |
destroy(): voidimport TreeView from './TreeView';
<TreeView />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Accordions.