Gangway
Sidebar navigation. Sections of links with the current page marked, folding into a drawer on a phone.
- Component
- Sidebar navigation
- Pattern
- Navigation + disclosure
- Outputs
- React + Tailwind, HTML/CSS/JS
- Status
- In stock, tested
Test bench
Runs the exported code, not a mock-up.
Gangway · React + TailwindFull width
| Keys | What happens |
|---|---|
| TaborShift + Tab | Move through the section headings and the links under them. |
| EnterorSpace | Fold a section away, or follow the focused link. |
| Esc | Close the drawer on a narrow screen, and put focus back on its button. |
Take it home
React + Tailwind CSS v4: install with one command, or copy the file. Your options are already in it.
npx shadcn@latest add "/r/sidebar.json"Run it in your project root. It writes components/sidebar.tsx with the options you set here. Needs Tailwind CSS v4 and a project set up for the shadcn CLI (npx shadcn@latest init).