Skip to content

TreeView

概要

TreeView は階層データを展開・選択しながら閲覧するコンポーネントです。フォルダ構造、レシピカテゴリ、デバイスマップのような階層情報を扱う用途に向いています。

Usage 使用例

基本

API Reference

TreeView.Root Props

PropsTypeDefaultDescription
size"sm" | "md" | "lg""md"行高さとフォント密度です
variant"plain" | "subtle""plain"見た目のバリエーションです
selectedIdsstring[]現在の選択ノード ID 群です
onSelectionChange(ids: string[]) => void選択変更時に呼ばれます
expandedIdsstring[]現在展開中のノード ID 群です
onExpandChange(ids: string[]) => void展開状態変更時に呼ばれます
dataTreeNode[][]ツリーデータです
classstring追加クラスです

Mithril UI Kit Documentation