AspectRatio
Description
A Box that takes a certain aspect ratio and fits img, picture, video and canvas tags inside it using object-fit: cover;.
Demo
import { AspectRatio } from "@neui/layout";
Live Editor
Result
Loading...
Props
| CSS Prop | Extends | RenderAs Prop | Renders by default |
|---|---|---|---|
| Box | Box |
| Name | CSS Rule(s) | Description |
|---|---|---|
aspectRatio | aspect-ratio | Sets the component's aspect ratio |