Component packs › Transit › Metro Sidebar

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.

Metro Sidebar props

PropTypeDefaultDescription
brandstringProduct name in the header.
itemsMetroItem[]
valuestringId of the current page.
collapsedboolean
onNavigate(id: string) => void
theme'dark' | 'light'
autoplaybooleanShowcase mode: rides between pages until touched.

Methods on the ref

Use it in React

import MetroSidebar from './MetroSidebar';

<MetroSidebar />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Transit

Good for: Navigation and menus.