Skip to content
Foundation / Layout

AspectRatio

server20.25 kB
@stellaria/nebula-webAspectRatioProps

Preview

Props

4
PropTypeDefault

children

ReactNode

className

Composes with the classes `Box` computes instead of replacing them.

string

component

The element it paints.

(ElementType & C)"div"

ratio

Width divided by height — `16 / 9` for video, `1` for a square. It reserves the height from the width before the content loads, which is what keeps an image or an iframe from shifting the page as it arrives.

number1

Also accepts

On top of its own props, this component forwards these groups.

Style props · 128