Skip to main content
WireKit
Copy for LLM

Aspect Ratio

A container that maintains a fixed aspect ratio. Useful for images, videos, maps, and embeds.

Basic Usage

Image constrained to 16:9
Landscape photo

Common Ratios

Different ratios with the same image
16:9 landscape

16:9 (default)

4:3 landscape

4:3

1:1 square

1:1 (square)

Portrait and Ultrawide

Portrait and ultrawide ratios
3:4 portrait

3:4 (portrait)

21:9 ultrawide

21:9 (ultrawide)

Props

Prop Type Default Description
ratio string|number '16/9' Aspect ratio value, e.g. "16/9", "4/3", "1/1", or 1.5
scope string|null null Scoped personalization name

The component renders as a <div> with overflow-hidden and position: relative. The native CSS aspect-ratio property handles the sizing. Children (images, videos, embeds) should use object-fit: cover and width: 100%; height: 100% to fill the container.

Keyboard Interaction

This component is a layout wrapper. Keyboard interaction is delegated to its children.

Was this page helpful?

Voting requires cookies or local storage. What we store