Component packs › Flaps › Collapsible Sidebar
Labels swing back on a vertical hinge one row after another as the bar narrows to an icon rail and the page widens.
Collapsible Sidebar is a sidebar 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: vertical hinge, staggered rows, own icon set.
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 |
|---|---|---|---|
links | SidebarLink[] | ||
collapsed | boolean | ||
dark | boolean | follows the page | Force the dark (true) or light (false) look. Default: follows the page. |
onToggle | (collapsed: boolean) => void | ||
autoplay | number | false | Showcase mode: collapses and expands every N ms while visible. |
toggle(collapsed?: boolean): voiddestroy(): voidimport CollapsibleSidebar from './CollapsibleSidebar';
<CollapsibleSidebar />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Accordions.