Aspect ratio

A box with a fixed width/height ratio; its image, video or iframe fills it.

Source on GitHub

16 / 9
Code

API

For AI agents: this API as Markdown, or every component in llms-full.txt.

<ray-aspect-ratio> · RayAspectRatio

PropertyAttributeTypeDefaultDescription
ratioratio reflectsstring16/9Width/height: "16/9", "4:3", "1" or a number.
fitfit reflectscover | containcoverHow the media fills the box (object-fit).
radiusradius reflectsstringCorner radius: xs…xl, full or a CSS length.
SlotDescription
(default)The media (img, video, iframe or any element); it fills the box.