layout/@mihcm/ui·v0.21.0·stable
AspectRatio
Locks a container to a given width-to-height ratio. Uses CSS aspect-ratio on web and RN aspectRatio style on native.
Props
The full prop API for AspectRatio. Same surface in web and React Native — bundlers pick the right variant via the react-native export condition.
| Prop | Type | Default | Description | Since |
|---|---|---|---|---|
ratio | number | 1 | Width-to-height ratio. E.g. 16/9, 4/3, 1. | 0.5.0 |
className | string | — | Additional Tailwind classes. | 0.5.0 |
Import
import { AspectRatio } from '@mihcm/ui/AspectRatio';