Tab Strip

デスクトップウィンドウのドキュメントタブ:タブごとのステータスドットと短いメモ、閉じるボタンと新規タブボタン、矢印キーでの移動、Delete または ⌘W で閉じる操作に対応します。

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

使い方

3 open

Agent run

インポート

ts
import {
  SoneTabStripComponent,
  SoneTabStripTrailingDirective,
} from "@surface-one/angular/tab-strip";

API リファレンス

SoneTabStripComponentコンポーネント

`<sone-tab-strip>` — document tabs for a desktop window (the WAI-ARIA Tabs pattern): a `tablist` of `tabs`, the selected one `[(active)]`, each with an optional status dot (`busy` pulses) and a short note. `closable` gives every tab a close button — a sibling of the tab, so the tab stays one control — and `addable` a "New tab" button. ←/→, Home and End move between tabs; Delete or ⌘W closes the focused one. Each tab points at its panel: `id="<panelIdPrefix>-<tab id>"`, labelled by `<panelIdPrefix>-tab-<tab id>`.

セレクター
sone-tab-strip
入力
名前型 デフォルト
tabsreadonly TabStripTab[][]
active双方向

The selected tab's id — `[(active)]`.

string | nullnull
ariaLabel

Names the tab list.

string$localize`:A tab strip's tab list:Tabs`
closable

Gives every tab a close button (and Delete / ⌘W).

booleanfalse
addable

Shows the "New tab" button after the tabs.

booleanfalse
panelIdPrefix

The id prefix the panels use, so each tab can point at its panel.

string"tab-panel"
出力
名前型
close

A tab's close button or Delete / ⌘W on it: the parent removes it and picks the new active tab.

string
add

The "New tab" button.

void

SoneTabStripTrailingDirectiveディレクティブ

Content after the tabs, pushed to the end of the strip (a search, an account).

セレクター
[soneTabStripTrailing]