Skip to content

IconButton

概要

IconButton はアイコンのみを表示する正方形ボタンです。ツールバーやカード右上の小さな操作トリガーなど、短いラベルを持たない UI に向いています。

Usage 使用例

基本

API Reference

IconButton Props

PropsTypeDefaultDescription
variantButtonVariant"solid"ボタンの見た目です
sizeButtonSize"md"ボタンサイズです
colorPalettestringカラー CSS 変数へ反映する色です
disabledbooleanfalse無効化します
loadingbooleanfalseローディング状態にします
rounded"sm" | "md" | "lg" | "xl" | "2xl" | "full"角丸を上書きします
aria-labelstringアクセシビリティ用の必須ラベルです
classstring追加クラスです
onclick(e: Event) => voidクリック時に呼ばれます

補足

可視ラベルが無いので、aria-label の指定を推奨します。

Mithril UI Kit Documentation