Jump to a page or a component.
The rail-plus-pane shell both apps hand-roll: a 48px icon strip that selects a full-height pane.
No install — ask an AI agent to copy this component from registry.json.
import { Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarHeader, SidebarItem, SidebarRail, SidebarRailButton, SidebarRailSpacer, SidebarRailTablist, SidebarSeparator, SidebarTitle } from "@/components/ui/sidebar";data-active is a styling hook and says nothing to a screen reader. When a rail button is a tab, set aria-selected and aria-controls alongside it, and give the pane role="tabpanel" with a matching id.side="right" to both SidebarRail and its buttons for a rail on the trailing edge — the border and the state markers both flip.texture draws a decorative wash — checker, dots or graph — on a ::before behind the content, from the active palette's accent. It is what makes a side panel read as a distinct layer rather than flat filler.relative and an opaque background), so the pattern belongs to the content area, not the chrome. Leave the rail flat too — a flat strip beside a textured pane is what makes the pane read as a surface — and never texture the work area.--app-texture-alpha (default 0.05). Set it on an ancestor to tune one panel, on :root to tune all of them — the apps expose it as a user setting.The props worth knowing. Everything else passes straight through to the underlying element, including className, which is merged last so it always wins.
| Prop | Type | Default | Description |
|---|---|---|---|
| side (Rail, RailButton) | "left" | "right" | "left" | Which edge the rail sits on, and which side its state markers point from. Pass the same value to both. |
| texture (Rail, Sidebar) | "none" | "checker" | "dots" | "graph" | "none" | Decorative wash over the surface, drawn from the palette accent at --app-texture-alpha. |
| size (RailButton) | "default" | "sm" | "default" | 36px, or 32px for a denser rail. |
| asChild (RailButton, Item) | boolean | false | Render the caller's child element instead of a <button> — for a control that is really a link. |
| data-active (RailButton) | boolean | — | Marks the current control: drives the tint and the edge marker. Pair with aria-selected when it is a tab. |
| data-selected (Item) | boolean | — | Marks the current row. Uses the same treatment as every other selectable row in the system. |