Component packs › Transit › Metro Sidebar
Pages are stations and the current page is a train that pulls away, cruises and brakes on the one you pick; nested groups branch off the line and rejoin it.
Metro Sidebar is a sidebar from Transit, a component pack with 8 components: Navigation components drawn as one metro line. Price: $2 for the whole pack.
Built with: motion profile, branch lines, collapse.
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 |
|---|---|---|---|
brand | string | Product name in the header. | |
items | MetroItem[] | ||
value | string | Id of the current page. | |
collapsed | boolean | ||
onNavigate | (id: string) => void | ||
theme | 'dark' | 'light' | ||
autoplay | boolean | Showcase mode: rides between pages until touched. |
readonly value: stringset(id: string): voiddestroy(): voidimport MetroSidebar from './MetroSidebar';
<MetroSidebar />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Navigation and menus.