Skip to content

AspectRatio

概要

AspectRatio は子要素の表示領域に一定の縦横比を維持させるコンポーネントです。サムネイル、動画、チャート領域のプレースホルダーを安定した比率で描画したいときに使います。

Usage 使用例

基本

API Reference

AspectRatio Props

PropsTypeDefaultDescription
rationumber4 / 3維持するアスペクト比です。16 / 9 のように数値で渡します
asstring"div"描画要素を切り替えます
classstring追加クラスです
styleRecord<string, string> | stringインラインスタイルです

Mithril UI Kit Documentation