Rail

ページの横に並ぶ細いアイコンボタンの列で、アプリの各場所へ移動します。現在の場所は浮き上がって表示され、ツールチップと「処理中」「要確認」「正常」のバッジが付きます。

対応フレームワーク
  • Angular: 対応
  • Vue: 対応
  • React: 対応
  • React Native: 未対応

使い方

Current place: home

インポート

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

API リファレンス

SoneRailButtonComponentコンポーネント

`<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.

セレクター
sone-rail-button
入力
名前型 デフォルト
icon必須ShellIcon—
label必須

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

SoneRailComponentコンポーネント

`<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.

セレクター
sone-rail
入力
名前型 デフォルト
ariaLabel

Names the navigation landmark.

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

SoneRailGroupDirectiveディレクティブ

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

セレクター
[soneRailGroup]