Badge

ステータス、件数、タグのためのコンパクトなラベル。6 つのバリアントと 4 つのステータス色があります。

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

使い方

DefaultSecondaryOutlineGhostDestructive
RecordingTranscribedExportedPausedSyncing
312899+Local onlyInteractive
design roadmap

インポート

ts
import {
  SoneBadgeDirective,
  SoneBadgeRemoveDirective,
} from "@surface-one/angular/badge";

API リファレンス

SoneBadgeDirectiveディレクティブ

セレクター
[soneBadge]
入力
名前型 デフォルト
variantBadgeVariant"default"
dot

A leading status dot in the badge's colour (the `<span class="badge-dot">` part, drawn for you).

booleanfalse
interactive

The badge reacts to the pointer (hover fill, pointer cursor) like a link or button badge — for a badge whose clickable parent is not itself the badge.

booleanfalse

SoneBadgeRemoveDirectiveディレクティブ

`button[soneBadgeRemove]` — the remove button inside a removable badge (a tag chip). Put the glyph inside (`<sone-icon icon="close" />`) and name it by what it removes: `aria-label="Remove design"`. `type` defaults to `button`.

セレクター
button[soneBadgeRemove]