Aspect Ratio

Displays content within a desired ratio.

utils
image
Description of the SVG image Loading...

Installation

Run the following command:

npx ever-ui-clx@0.2.1 add demo-aspect-ratio

Usage

import Image from "next/image";
 
import { AspectRatio } from "@/components/ui/aspect-ratio";
<div className="w-[450px]">
  <AspectRatio ratio={16 / 9}>
    <Image src="..." alt="Image" className="rounded-md object-cover" />
  </AspectRatio>
</div>