43 Pro components and page blocks

Get Pro

Nested Sidebar

New

Preview

Customize

Width272px

Usage

import { NestedSidebar } from "@/components/uibrik/nested-sidebar/nested-sidebar";

<NestedSidebar />

Installation

npx shadcn@latest add https://uibrik.com/r/nested-sidebar.json
Adds the files to components/uibrik/nested-sidebar and installs @tabler/icons-react and motion. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/nested-sidebar.

Props

NestedSidebar
defaultCollapsed
Type boolean
false
Folded to the icon rail at first. When unset, it starts folded on phones and open on larger screens.
shortcut
Type boolean
true
Toggle with ⌘B / Ctrl+B.
search
Type boolean
true
Show the search field (press / to focus).
width
Type number
272
Width.
groups
Type { label?; items: { label; icon?; href?; badge?; items? }[] }[]
sample app navigation
The navigation. Same shape across all sidebars.
brand
Type { name; caption?; logo? }
–
Workspace shown at the top.
user
Type { name; email? }
–
Account shown at the bottom.
current / onNavigate
Type string / (label) => void
–
The current page, and a callback when one is chosen.
collapsed / onCollapsedChange
Type boolean / (collapsed) => void
–
Folded state, controlled.
className
Type string
–
Classes for the sidebar.
defaultOpen
Type string[]
–
Labels of items open at first.