Side panel rail
ProA strip of icon links or buttons at the end edge of the window that hides to a small tab. Not an M3 component (@windmorph/react-pro).
import { SidePanelRail, SidePanelRailItem } from '@windmorph/react-pro';Part of Windmorph Pro, paid components on the free core, not on sale yet. See the Pro guide for what it includes and to register interest.
Props
SidePanelRail 15 props
SidePanelRailItemelements.Whether the strip is open (controlled).
Whether the strip starts open (uncontrolled).
Below this window size the strip is not shown.
falsealways shows it.Replaces the toggle's chevron; it should point to the end edge.
Ref to the outermost element.
The outermost element's id.
The outermost element's role, e.g.
groupwhen every item is a button.
Text
Words the rail announces, with English defaults. A
LabelsProvidersets them for the whole app.One of
aria-labeloraria-labelledbyis required.One of
aria-labeloraria-labelledbyis required.
Classes for the outermost element. Wins over the defaults via
cn().Classes for each part.
The outermost element.
The box that clips the items while the strip is narrow.
The column of items.
Each item's row.
The selected item's bar.
The box that sizes and shapes the toggle.
The toggle button.
The toggle's chevron.
Inline styles for the outermost element, e.g.
--wm-side-panel-rail-*tokens.
SidePanelRailItem 13 props
The item's icon.
The item's name, shown in its tooltip.
Makes the item a link to this address.
Marks the link to the page the app is on (
aria-current="page").Marks the button whose sheet or panel is open (
aria-pressed).Where the link opens.
The link's relationship to this page.
Ref to the link.
Whether the item can be used.
The button's or link's id.
Spec status
Not part of Material Design 3: a Windmorph Pro component, built on M3's colour roles, type scale, shapes and motion. Its variants and configurations each link to a live example.
| Item | Status | Details |
|---|---|---|
| Links and buttons, hiding to a tab | Built | Configuration · Basic |
Opening a standard side sheet (selected) | Built | Use case · With sheet |
Controlled by the app (open, onOpenChange) | Built | Configuration · Controlled |
Links and buttons, hiding to a tab
BuiltConfiguration · Basic
Opening a standard side sheet (
Builtselected)Use case · With sheet
Controlled by the app (
Builtopen,onOpenChange)Configuration · Controlled
Theming & tokens
Set the tokens below on the strip or any ancestor. Its items and toggle keep the IconButton's own tokens. Style each part with classNames: root, clip, items, item, indicator, tab, toggle, chevron.
| Variable | Default | Paints |
|---|---|---|
--wm-side-panel-rail-width | 56px | The strip’s width while open. |
--wm-side-panel-rail-hidden-width | 16px | The gutter left while hidden. |
--wm-side-panel-rail-items-gap | 8px | The space between items. |
--wm-side-panel-rail-items-padding-top | 4px | The space above the first item. |
--wm-side-panel-rail-toggle-size | 40px | The toggle’s width and height while open. |
--wm-side-panel-rail-toggle-inset | 8px | The toggle’s distance from the end edge while open, and from the bottom. |
--wm-side-panel-rail-tab-width | 24px | The tab’s width at rest. |
--wm-side-panel-rail-tab-hover-width | 48px | The tab’s width under a pointer. |
--wm-side-panel-rail-tab-height | 40px | The tab’s height. |
--wm-side-panel-rail-tab-touch-size | 48px | The tab’s width and height on a touch screen. |
--wm-side-panel-rail-tab-color | var(--md-sys-color-secondary-container) | The tab’s fill. |
--wm-side-panel-rail-tab-icon-color | var(--md-sys-color-on-secondary-container) | The chevron on the tab. |
--wm-side-panel-rail-tab-corner | var(--md-sys-shape-corner-full) | The tab’s corners on its start side, and the open toggle’s. |
--wm-side-panel-rail-chevron-size | 24px | The chevron. |
--wm-side-panel-rail-chevron-rest-center | 14px | The chevron’s centre, from the tab’s start, at rest. |
--wm-side-panel-rail-chevron-hover-center | 20px | The chevron’s centre, from the tab’s start, under a pointer. |
--wm-side-panel-rail-indicator-width | 3px | The selected item’s bar. |
--wm-side-panel-rail-indicator-height | 16px | The selected item’s bar. |
--wm-side-panel-rail-indicator-color | var(--md-sys-color-secondary) | The selected item’s bar. |
--wm-side-panel-rail-indicator-corner | var(--md-sys-shape-corner-full) | The corners of the selected item’s bar. |
--wm-side-panel-rail-move-duration | var(--md-sys-motion-spring-spatial-default-duration) | How long the strip, tab and chevron take to move. |
--wm-side-panel-rail-move-easing | var(--md-sys-motion-spring-spatial-default-easing) | The curve of the strip, tab and chevron. |
--wm-side-panel-rail-fade-duration | var(--md-sys-motion-spring-effects-default-duration) | How long the items’ fade and the tab’s colour take. |
--wm-side-panel-rail-fade-easing | var(--md-sys-motion-spring-effects-default-easing) | The curve of the items’ fade and the tab’s colour. |