AspectRatio
Layout

AspectRatio.

Keep images, previews or content at a fixed proportion.

Real interactive component
Live demo
16 : 9

The preview uses the actual shared component, including your current theme, rounding, border and motion preferences.

Props & API reference

Parameters available in the shared component, including value types, requirements and accepted options.

3 props
ParameterTypeRequiredDefaultPossible valuesDescription
childrenReactNodeYes——Image, video or other content.
rationumberNo16 / 9—Width-to-height ratio.
classNamestringNo——Additional wrapper class.