Skip to content

Stack

概要

Stack は子要素を一列に並べるためのレイアウトコンポーネントです。separator を使うと要素間に区切りを挿入でき、HStackVStackdirection を固定したショートカットとして使えます。

Usage 使用例

基本

API Reference

Stack Props

PropsTypeDefaultDescription
direction"row" | "column" | "row-reverse" | "column-reverse""column"並び方向です
gapstring | number子要素間の間隔です
alignstringalign-items を指定します
justifystringjustify-content を指定します
wrap"wrap" | "nowrap" | "wrap-reverse"折り返し挙動です
separatorm.Children子要素の間に挿入する区切り要素です
asstring"div"描画要素を切り替えます
classstring追加クラスです
styleRecord<string, string> | stringインラインスタイルです

Aliases

ComponentDescription
Stack任意方向を選べる基本コンポーネントです
HStackdirection="row" を固定したショートカットです
VStackdirection="column" を固定したショートカットです

Mithril UI Kit Documentation