1. Layout
  2. Aspect Ratio

Layout

Aspect Ratio

This component is used to create a container with a fixed aspect ratio around a media provider.

Usage

The <vds-aspect-ratio> component creates a container that will try to hold the dimensions of the desired aspect ratio. Fixed dimensions are great for creating uniform and responsive boxes, or avoiding layout shifts while media loads over the network.

          
        

aspect-ratio

You can skip using this component, and use the aspect-ratio CSS property if browser support for it is suitable to your application.

css
        video {
  aspect-ratio: 16 / 9;
}