Aspect Ratio
Locks content to a fixed width-to-height ratio. Useful for media, embeds, and placeholders that need to keep their proportions across viewport sizes.
16 / 9
Installation
Props
Built on Radix UI Aspect Ratio.
| Prop | Type | Default | Description |
|---|---|---|---|
ratio | number | 1 | The desired aspect ratio (e.g. 16/9, 4/3, 1). |
asChild | boolean | false | Renders as the child via Radix Slot. |