IconButton
IconButtonは、アイコンのみを表示する正方形のボタンです。 ツールバー、ナビゲーション、コンパクトなUIで使用します。
6
Variants
5
Sizes
1:1
Aspect Ratio
Pure
React
Playground
Preview
solidD40px / Icon 20px
Variant
Color
Size
Radius
Icon
State
<IconButton aria-label="Action">
<Search />
</IconButton>Variants
Style
Solid
ソリッド背景。最も視覚的に目立つスタイル。
追加、送信
Outline
中立的なアクション。背景と調和させたい場合。
情報、詳細
Ghost
最小限の視覚的存在感。ツールバーなどに最適。
ツールバー
Subtle
控えめな存在感でホバー時に強調。ヘッダーやサイドバーに。
ヘッダー、ナビ
Solid Colors
Default
ダークカラー。最も汎用的なCTA。
追加、送信
Primary
ブランドカラー。ブランドを強調するアクション。
お気に入り
Secondary
補助的なアクション。プライマリと並べて使用。
設定、編集
Destructive
破壊的なアクション。削除や取消不能な操作に。
削除、閉じる
Sizes
xsサイズ28px
アイコン14px
smサイズ32px
アイコン16px
mdサイズ36px
アイコン16px
defaultサイズ40px
アイコン20px
lgサイズ48px
アイコン24px
| Size | 幅 | 高さ | アイコン | プレビュー |
|---|---|---|---|---|
xs | 28px | 28px | 14px | |
sm | 32px | 32px | 16px | |
md | 36px | 36px | 16px | |
default | 40px | 40px | 20px | |
lg | 48px | 48px | 24px |
タッチターゲット: WCAG 2.5.8基準では最小24pxのタッチ領域が必要です。 最小のxs(28px)でもWCAG基準を満たしています。
States
Solid Primary
Outline
Subtle
API
Props
variant"solid""solid" | "outline" | "ghost" | "subtle"ボタンのスタイル
color"default""default" | "primary" | "secondary" | "destructive"solidバリアントの色。solid以外では無視
size"default""xs" | "sm" | "md" | "default" | "lg"ボタンのサイズ (28/32/36/40/48px)
radius"default""none" | "sm" | "base" | "default" | "lg" | "xl" | "2xl" | "3xl" | "full"角丸のサイズ (6px)
loadingfalsebooleanローディングStates
disabledfalseboolean無効States
pressEffectundefinedbooleanプレスエフェクト(active:scale-pressed)。未指定時はtrueとして動作。falseで無効化
asChildfalsebooleanSlotとしてレンダリング
aria-labelundefinedstringアクセシビリティラベル(必須)
| Name | Type | Default | Description |
|---|---|---|---|
variant | "solid" | "outline" | "ghost" | "subtle" | "solid" | ボタンのスタイル |
color | "default" | "primary" | "secondary" | "destructive" | "default" | solidバリアントの色。solid以外では無視 |
size | "xs" | "sm" | "md" | "default" | "lg" | "default" | ボタンのサイズ (28/32/36/40/48px) |
radius | "none" | "sm" | "base" | "default" | "lg" | "xl" | "2xl" | "3xl" | "full" | "default" | 角丸のサイズ (6px) |
loading | boolean | false | ローディングStates |
disabled | boolean | false | 無効States |
pressEffect | boolean | undefined | プレスエフェクト(active:scale-pressed)。未指定時はtrueとして動作。falseで無効化 |
asChild | boolean | false | Slotとしてレンダリング |
aria-label | string | undefined | アクセシビリティラベル(必須) |