Icon Rail
Narrow vertical (or horizontal) strip of icon-only buttons — the tool rail of an editor shell. One item is active; the consumer switches panels on click via the data-rail-item attribute. Content stays data-driven through the items prop. 1.4.0 opt-in: floating (schwebend, am Griff verschiebbar, Posit
Nutzt: ui.icon ui.featured-icon ui.badge
Beispiele
Eigenschaften
| Prop | Typ | Default | Builder-Label |
|---|---|---|---|
| orientation | string: vertical | horizontal | "vertical" | Orientation |
| items * | array | — | Rail items |
| floating | boolean | false | Schwebend (verschiebbar) |
| storageKey | string | "" | Position merken unter |
| captions | boolean | true | Beschriftung unter den Kacheln |
| activeStyle | string: surface | plain | "surface" | Aktiv-Darstellung |
| appearance | string: default | featured | "default" | Darstellung |
| padding | string: standard | none | sm | md | lg | xl | "standard" | Innenabstand (standard = Baustein-Wert) |
| margin | string: standard | none | sm | md | lg | xl | "standard" | Aussenabstand |
| border | string: standard | none | hairline | strong | "standard" | Rahmen |
| radius | string: standard | none | control | surface | pill | "standard" | Ecken-Rundung |
| textColor | string | "" | Textfarbe (Token; leer = Standard) |
| backgroundColor | string | "" | Hintergrundfarbe (Token; leer = Standard) |
| shadow | string: standard | none | sm | md | lg | "standard" | Schatten |
| width | string: standard | full | "standard" | Breite |
| alignSelf | string: standard | start | center | end | "standard" | Ausrichtung im Elternteil |
| anchor | string | "" | Anker-ID (Sprungziel, z. B. fuer Nav-Links) |
* Pflicht-Prop
Genutzte Design-Tokens
LLM-Notizen
component.icon-rail
Narrow strip of icon-only buttons — the tool rail of an editor shell. Vertical by default (or horizontal), one item active, data-driven through the items prop.
When to use
- The far-left rail of an editor/app-shell that switches the adjacent panel (blocks · structure · files …).
- A compact device/mode switcher (horizontal).
- NOT a full navigation with labels → that is
component.navigation/component.sidebar.
Props
orientation—vertical(default) orhorizontal.items— array of{ icon, label, value, active? }.iconis required (aui.iconname);labelbecomes the tooltip/aria-label;valueis a stable key placed ondata-rail-item;activemarks the current one.
Interaction
The rail is presentational: it renders buttons with data-rail-item="<value>". The consumer wires the click (like a tab strip) and decides what each value shows. No client controller, no built-in event — this keeps the rail reusable for any switching logic.
Tokens
Buttons are --size-9 squares, --radius-control; hover uses --color-surface-sunken, active adds --color-action-primary. No raw colours or pixels.