AspectRatio API
Reserves a box with a fixed width-to-height ratio using CSS
aspect-ratio.Related
Explore these related pages for additional context and usage patterns.
| Page | Category |
|---|---|
| Aspect Ratio | Primitives |
| Image | Semantic |
| Atom | Primitives |
AspectRatio
Props
ratio
string | number | undefinedThe aspect ratio as width / height. Accepts a number (16 / 9) or a
CSS aspect-ratio string ('16 / 9', '1.777').
Default: 1
Slots
default
AspectRatioSlotProps