Aspect Ratio

Aspect ratio keeps content at a fixed width-to-height ratio so it scales correctly.

@radix-ui/react-aspect-ratio

Installation


1

Install the following dependencies:

npx shadcn@latest add https://sbthemes-storev2.vercel.app/r/aspect-ratio.json

Examples


Ratio (4/3)


API Reference

PropTypeDefault
sizesm, md, lgmd