UI
Aspect Ratio
This component is used to create a container with a fixed aspect ratio around a media provider.
Import
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.
Styling
For the media to be rendered correctly, you need to ensure the media elements fill their container like so:
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.
Previous
<-
Media Visibility
Next
Poster
->