43 Pro components and page blocks

Get Pro

Collapsible Sidebar

Preview

Customize

Width248px

Usage

import { CollapsibleSidebar } from "@/components/uibrik/collapsible-sidebar/collapsible-sidebar";

<CollapsibleSidebar />

Installation

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

Props

CollapsibleSidebar
defaultCollapsed
Type boolean
false
Folded to the icon rail at first. When unset, it starts folded on phones and open on larger screens.
width
Type number
248
Width when open.
shortcut
Type boolean
true
Toggle with ⌘B / Ctrl+B.
groups
Type { label?; items: { label; icon?; href?; badge? }[] }[]
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.
className
Type string
–
Classes for the sidebar.
collapsed / onCollapsedChange
Type boolean / (collapsed) => void
–
Folded state, controlled.