SidebarRail on a phone
The same sidebar in a 24 rem frame, so the layout switches to the menu button and the drawer. Open the menu: the sections are the first screen, a section is the second, and a page with children opens the next screen, each with a back row that names where it returns to. Nothing expands in place.
- SidebarRail
PreviewLink to the section Preview
Live in all three themes. Everything here is interactive.
Light theme, SidebarRail on a phone
Dark theme, SidebarRail on a phone
High contrast theme, SidebarRail on a phone
UsageLink to the section Usage
import { SidebarRail } from '@skribly/ui/shell'<SidebarRail sections={sections} current={pathname}
labels={{ …, back: 'All sections', backTo: (label) => `Back to ${label}` }} />Every label is a prop, so the app passes its own words in its own language. See no built-in text.
AccessibilityLink to the section Accessibility
- The menu button opens a modal drawer: focus moves in, stays in, and returns to the menu button on Escape.
- Only the top screen can be reached; the ones under it are inert.
- A new screen slides in over 180 ms, or appears at once under reduced motion.
- A row with a chevron opens the next screen.
- The back row is named by backTo, such as "Back to Commerce".
- The drawer opens on the screen of the open page.
This demo runs through axe in all three themes on every test run. See what the tests check.