Toggle Sidebar B
header.lightDarkMode D

Aspect Ratio

Locks child content to a fixed width-to-height ratio. Built on reka-ui.

Default

16:9 image container that scales with its parent width.

Landscape

Square

Set ratio=1 for square thumbnails.

API Reference

Props, events, and slots for each sub-component.

AspectRatio

Props

PropTypeDefaultDescription
rationumber1Width-to-height ratio. 16/9 ≈ 1.78, 4/3 ≈ 1.33, 1 = square.
asChildbooleanfalseRender into the child element instead of a wrapper div.