# Rail Panel Sidebar – Icon Rail with Context Panels, Pin to Collapse and Hover Peek

> Rail Panel Sidebar for React and Tailwind CSS (shadcn/ui): an icon rail plus a context panel per section. It is built to show where you just went: the active marker slides along the rail and the panel content enters from the direction of travel. Unpin it and the panel folds into the rail; hover or focus the rail and the panel peeks over the content as a floating layer. Controlled or uncontrolled activeId, pinned and peeking, arrow keys, Enter and Escape, aria-current, reduced motion, light and dark. Use it for workspace app shells. The included demo plays a scripted tour on local data and makes no network requests (inline avatars). Requires React only, with no animation library.

- Author: [DHxWhy](https://21st.dev/@dhxwhy)
- License: mit
- Tags: Sidebar, Navigation, Menu, Dashboard, Layout
- npm dependencies: lucide-react
- Live preview: https://21st.dev/@dhxwhy/components/rail-panel-sidebar

## Install

```bash
npx shadcn@latest add "https://21st.dev/r/dhxwhy/rail-panel-sidebar?api_key=$API_KEY_21ST"
```

Requires a 21st API key (generate one at https://21st.dev/mcp) passed as `API_KEY_21ST`. Free accounts get a limited number of installs per day; unlimited on a paid plan — see https://21st.dev/pricing.

Full component directory: https://21st.dev/llms.txt · More like this: https://21st.dev/community/components/s/sidebar.md
