Atelier UI

Search components…

Search components…

Tree Navigation

A collapsible nested navigation tree with WAI-ARIA arrow-key navigation, badges and controlled selection.

Edit in sandbox

Copy a prompt for your AI coding tool with the source, dependencies and usage

Props

TreeNavProps

Also accepts all props of Omit<React.ComponentProps<"ul">, "defaultValue" | "onChange">

PropTypeDefaultDescription
items* requiredTreeNavItem[]——
valuestring—Selected item id (controlled)
defaultValuestring——
onValueChange(id: string) => void——
expandedstring[]—Expanded item ids (controlled)
defaultExpandedstring[][]—
onExpandedChange(ids: string[]) => void——

Install

$ npx shadcn@latest add https://chromotion.dev/r/tree-nav.json

More like this