apps/design-system/content/docs/components/aspect-ratio.mdx
npx shadcn-ui@latest add aspect-ratio
<Step>Install the following dependencies:</Step>
npm install @radix-ui/react-aspect-ratio
<Step>Copy and paste the following code into your project.</Step>
<ComponentSource name="aspect-ratio" /><Step>Update the import paths to match your project setup.</Step>
</Steps> </TabsContent> </Tabs>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>