Skip to content

Flex

概要

Flex は Flexbox ベースのレイアウトコンポーネントです。directionalignjustifygap を declarative に指定でき、Spacer を使うと空き領域の押し出しも簡単に行えます。

Usage 使用例

基本

API Reference

Flex Props

PropsTypeDefaultDescription
direction"row" | "row-reverse" | "column" | "column-reverse"フレックス方向です
alignstringalign-items を指定します
justifystringjustify-content を指定します
wrap"wrap" | "nowrap" | "wrap-reverse"折り返し挙動です
basisstringflex-basis を指定します
grownumber | stringflex-grow を指定します
shrinknumber | stringflex-shrink を指定します
gapstring | number子要素間の間隔です
inlinebooleanfalseinline-flex として描画します
asstring"div"描画要素を切り替えます
classstring追加クラスです
styleRecord<string, string> | stringインラインスタイルです

Subcomponents

ComponentDescription
Spacer残りの空き領域を埋めて、後続要素を端へ押し出します

Mithril UI Kit Documentation