メインコンテンツへスキップ
ホーム/コンポーネント/フォームと入力/ボタン

FormButton

アクションを実行するためのボタンコンポーネント。variant / size / icon / shortcut / disabled をサポート。

import { FormButton } from "@blueai/ui"

Examples

Variants
Sizes
With Icon
With Shortcut
Disabled

Props

PropTypeDefaultDescription
variant"primary" | "secondary" | "danger" | "ghost" | "link" | "outline" | "slack""primary"ボタンのスタイル
size"xs" | "sm" | "md" | "lg""md"ボタンのサイズ
iconReactNodeボタン内に表示するアイコン
shortcut{ mac: string; win: string }キーボードショートカットラベル
fullWidthbooleanfalse幅を100%にする
disabledbooleanfalse無効状態
type"button" | "submit" | "reset""button"HTML button type
onClick() => voidクリックハンドラ
children*ReactNodeボタンのラベル

ガイドライン

Do
  • 主要アクションには Primary を使い、1 画面に 1 つまでにする
  • ラベルには動詞を使う(「保存する」「追加する」「送信する」)
Don't
  • 複数の Primary ボタンを横に並べない
  • 「OK」「はい」のような曖昧なラベルを使わない