Nested Nav

A collapsible tree navigation built from nested node data, indented by depth with rotating chevrons on items that have children. Fits React docs sidebars.

src/registry/ui/nested-nav.tsx/r/nested-nav.json

Installation#

bash
npx shadcn@latest add @minidev/nested-nav

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/nested-nav.json

Usage#

tsx
import { NestedNav } from "@/components/ui/nested-nav"

export function Example() {
  return <NestedNav />
}

API reference#

NestedNav props
PropTypeDefault
nodesNavNode[]SAMPLE_NODES
classNamestring-

Dependencies#

npm

lucide-react

Built from

No other MiniDev files
All navigation components

Learn more