Skip to content

AspectRatio ​

Overview ​

Constrains content to a given aspect ratio using Reka UI's AspectRatio primitive.

Theme entry: AspectRatio

Props ​

NameTypeRequiredDefaultDescription
themeOverrideObjectnullA partial ThemeObject keyed by component name, merged over this component's theme and provided to descendants.
classimport('vue').HTMLAttributes['class']undefinedAdditional CSS classes to apply to the root element.
rationumber1The desired aspect ratio (e.g. 16/9).
asstring|objectundefinedThe element or component to render as.
asChildbooleanfalseWhen true, merges props onto the child element instead of rendering a wrapper.

Slots ​

default ​

Scoped slot.

Source ​

client/lib/display/aspect-ratio/AspectRatio.vue