Theme: ← Übersicht Tokens

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

Components v1.7.0 Desktop AppDesktop component.icon-rail

Nutzt: ui.icon ui.featured-icon ui.badge

Beispiele

Editor tool rail (blocks active)
Horizontal

Eigenschaften

PropTypDefaultBuilder-Label
orientationstring: vertical | horizontal"vertical"Orientation
items *array—Rail items
floatingbooleanfalseSchwebend (verschiebbar)
storageKeystring""Position merken unter
captionsbooleantrueBeschriftung unter den Kacheln
activeStylestring: surface | plain"surface"Aktiv-Darstellung
appearancestring: default | featured"default"Darstellung
paddingstring: standard | none | sm | md | lg | xl"standard"Innenabstand (standard = Baustein-Wert)
marginstring: standard | none | sm | md | lg | xl"standard"Aussenabstand
borderstring: standard | none | hairline | strong"standard"Rahmen
radiusstring: standard | none | control | surface | pill"standard"Ecken-Rundung
textColorstring""Textfarbe (Token; leer = Standard)
backgroundColorstring""Hintergrundfarbe (Token; leer = Standard)
shadowstring: standard | none | sm | md | lg"standard"Schatten
widthstring: standard | full"standard"Breite
alignSelfstring: standard | start | center | end"standard"Ausrichtung im Elternteil
anchorstring""Anker-ID (Sprungziel, z. B. fuer Nav-Links)

* Pflicht-Prop

Genutzte Design-Tokens

border.hairlinecolor.action.primarycolor.border.subtlecolor.surface.defaultcolor.surface.selectedcolor.surface.sunkencolor.text.defaultcolor.text.mutedduration.fasteasing.standardelevation.overlaygradient.brand-subtleleading.tightradius.controlradius.fullradius.surfacesize.1size.12size.16size.2size.3size.4size.6size.9text.2xstext.xsweight.mediumweight.semibold

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) or horizontal.
  • items — array of { icon, label, value, active? }. icon is required (a ui.icon name); label becomes the tooltip/aria-label; value is a stable key placed on data-rail-item; active marks 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.