Rail

Eine schmale Spalte aus Symbolschaltflächen neben der Seite für die Orte einer App, mit hervorgehobenem aktuellem Ort, Tooltips und Badges für „beschäftigt“, „Achtung“ oder „ok“.

Verfügbar für
  • Angular: verfügbar
  • Vue: verfügbar
  • React: verfügbar
  • React Native: noch nicht verfügbar

Verwendung

Current place: home

Import

ts
import {
  SoneRailButtonComponent,
  SoneRailComponent,
  SoneRailGroupDirective,
} from "@surface-one/angular/rail";

API-Referenz

SoneRailButtonComponentKomponente

`<sone-rail-button>` — one place on a rail: a square icon button whose `label` is its accessible name and its tooltip (`title`). `current` marks the place on screen (`aria-current="page"`): a raised island with the accent icon. `badge` adds a status dot in the corner (busy pulses); say the status in the label when it matters.

Selektor
sone-rail-button
Inputs
NameTyp Standard
iconerforderlichShellIcon—
labelerforderlich

The accessible name and the tooltip.

string—
current

The place on screen now (`aria-current="page"`).

booleanfalse
badge

A status dot in the corner.

RailBadge | nullnull
disabledbooleanfalse

SoneRailComponentKomponente

`<sone-rail>` — a narrow column of icon buttons beside the page (on the glass in the Surface skin): app-level places such as Home, Search or Settings. A `nav` landmark named by `ariaLabel`; put the buttons in `[soneRailGroup]` blocks — the first group sits at the top, the last at the bottom.

Selektor
sone-rail
Inputs
NameTyp Standard
ariaLabel

Names the navigation landmark.

string$localize`:The rail's navigation landmark:Main`

SoneRailGroupDirectiveDirektive

A column of rail buttons; the rail spreads its groups from top to bottom.

Selektor
[soneRailGroup]