Skip to content

Float

概要

Float は親要素の四隅や中央辺へ小さな要素を重ねて配置するユーティリティです。通知バッジ、オンライン表示、補助ラベルなどを親コンテンツに重ねたいときに使います。

Usage 使用例

基本

API Reference

Float Props

PropsTypeDefaultDescription
placementFloatPlacement"top-end"配置位置を指定します
offsetstring | numberX/Y 共通のオフセットです
offsetXstring | number水平方向だけ個別にずらします
offsetYstring | number垂直方向だけ個別にずらします
asstring"div"描画要素を切り替えます
classstring追加クラスです
styleRecord<string, string> | stringインラインスタイルです

補足

親要素側に position: relative を設定してください。

Mithril UI Kit Documentation