バッジ (Badge)

UI要素用の小さな数値またはステータス記述子。

いつ使用するか

バッジは通常、通知やユーザーアバターの近くに目を引くアピールとともに表示され、通常は未読メッセージ数を表示します。

インテント (Intent)

バッジの視覚的なインテントまたはカラースキーム。

Primary Secondary Success Danger Warning Info

バリアント

バッジのスタイルバリアント。`solid`、`soft`、または`outline`を使用します。

Solid Soft Outline

サイズ

バッジのサイズを設定します。

Small Medium Large

形状

バッジには、ピル(デフォルト)または丸角などのさまざまな形状を持たせることができます。

Pill Rounded

ドット (Dot)

これにより、特定のカウントなしでバッジドットが単に表示されます。

スタンドアロン / 通知

未読カウントなどの数値インジケーターには、`notification`の形状を使用します。

3 +99

ポジショニング

バッジは、`position`プロパティを使用して親コンテナに対して絶対位置に配置できます。

9

API

プロパティ
説明
タイプ
デフォルト

intent

The visual intent or color scheme of the badge. "primary" | "secondary" | "success" | "danger" | "warning" | "info" "primary"

variant

The style variant of the badge. "solid" | "outline" | "soft" "soft"

size

The size of the badge. "sm" | "md" | "lg" "md"

shape

The geometric shape of the badge. "rounded" | "pill" | "dot" | "notification" "pill"

position

Positions the badge absolutely relative to its nearest positioned ancestor. "top-right" | "bottom-right" | "top-left" | "bottom-left" -

class

Additional CSS classes to apply to the badge. string -