Aspect Ratio
Displays content within a desired ratio.
Installation
Usage
<AspectRatio Ratio="@(16.0 / 9)"><img src="..." alt="Image" class="rounded-md object-cover" /></AspectRatio>Square
A square aspect ratio component using the Ratio="@(1.0 / 1)" parameter. This is useful for displaying images in a square format.
Portrait
A portrait aspect ratio component using the Ratio="@(9.0 / 16)" parameter. This is useful for displaying images in a portrait format.
RTL
To enable RTL support in Blazix, see the RTL configuration guide.
Translated with AI for the demo, so it may have mistakes.
API Reference
AspectRatio
Other attributes are passed to the element it renders.