Components
← All components

Aspect Ratio

stimeo--aspect-ratio

Hands a chosen aspect ratio to CSS. Keeping the box proportional stays with your styles.

  • Core

A small layout helper that hands a chosen aspect ratio to CSS and nothing more. It has no role and no state, so it changes nothing for screen readers. It takes both the `16/9` form and a plain number. A value it cannot read falls back to one to one. Change the value and it is reflected straight away. Making the box hold that ratio stays with your styles, so how an image is cropped inside it remains your decision.

running
16 / 9
16 / 9 (widescreen)
1 / 1
1 / 1 (square)
3 / 4
3 / 4 (portrait)

Keyboard

This component has no keyboard interactions of its own.