Aspect Ratio
Displays content with a desired ratio.
Basic Example
Setting the ratio prop will adjust the width or height
of the content such that the width divided by the height equals the ratio.
For responsive scaling, set the width or height of the content to "100%".
ExpandCollapse




API Reference
rx.aspect_ratio
Displays content with a desired ratio.
Props
| Prop | Type | Description |
|---|---|---|
ratio | Union[float, int] | The ratio of the width to the height of the element. |