Skip to content

Steps

概要

StepsSteps.List, Steps.Item, Steps.Trigger, Steps.Content を組み合わせて進行状況を表すコンポーネントです。現在ステップの表示だけでなく、完了済み状態の可視化、PrevTrigger / NextTrigger による前後移動、linear による順序制約、orientation による縦配置に対応しています。

TIP

旧ステッパー(StepsClassic)はレガシー扱いです。このページでは current API を案内します。

Usage 使用例

基本

手順の流れと、現在の本文を同じ画面で見せる基本パターンです。

制御モード

steponStepChange を使うと、外部状態と同期したステップ管理やリセット処理を実装できます。

縦配置

orientation="vertical" は、設定ウィザードや作業手順のサイド表示に向いています。

API Reference

Steps.Root Props

PropsTypeDefaultDescription
countnumberステップ総数です
stepnumber制御モード時の現在ステップです。0 始まりです
defaultStepnumber0非制御モード時の初期ステップです
onStepChange(details: { step: number }) => voidステップ変更時に呼ばれます
onStepComplete() => void完了状態に入ったときに呼ばれます
linearbooleanfalse未来のステップへの直接移動を禁止します
variant"solid" | "subtle""solid"ステッパーの見た目です
size"xs" | "sm" | "md" | "lg""md"インジケーターと文字サイズです
orientation"horizontal" | "vertical""horizontal"ステップの並び方向です
classstring追加クラスです
styleRecord<string, string>ルートのインラインスタイルです

Steps.Item Props

PropsTypeDefaultDescription
indexnumber対応するステップ番号です。0 始まりです
classstring項目に追加するクラスです
styleRecord<string, string>項目のインラインスタイルです

Steps.Content Props

PropsTypeDefaultDescription
indexnumber対応するステップ番号です
classstringコンテンツに追加するクラスです
styleRecord<string, string>コンテンツのインラインスタイルです

ナビゲーション系 Props

ComponentProps
Steps.Listclass?: string, style?: Record<string, string>
Steps.Triggerclass?: string, style?: Record<string, string>
Steps.Indicatorclass?: string, style?: Record<string, string>
Steps.Separatorclass?: string, style?: Record<string, string>
Steps.CompletedContentclass?: string, style?: Record<string, string>
Steps.Titleclass?: string, style?: Record<string, string>
Steps.Descriptionclass?: string, style?: Record<string, string>
Steps.PrevTriggerclass?: string, style?: Record<string, string>
Steps.NextTriggerclass?: string, style?: Record<string, string>

Subcomponents

ComponentDescription
Steps.Root現在位置と完了状態を管理するルートです
Steps.Listステップ一覧全体です
Steps.Item1 件ぶんのステップ項目です
Steps.Triggerステップ選択ボタンです
Steps.Indicator番号や完了状態を示す丸インジケーターです
Steps.Separator項目間の接続線です
Steps.Content現在ステップに対応する本文です
Steps.CompletedContent完了時に表示する本文です
Steps.Titleステップ名です
Steps.Description補足説明です
Steps.PrevTrigger前のステップへ戻るボタンです
Steps.NextTrigger次のステップへ進むボタンです

Mithril UI Kit Documentation