Utility
AI
Terminal
Installation
pnpm dlx shadcn@latest add https://termcn.dev/r/aspect-ratio.json
Usage
import { AspectRatio } from "@/components/ui/aspect-ratio";<AspectRatio ratio={16 / 9} width={60}>
<Text>Widescreen content</Text>
</AspectRatio>API Reference
AspectRatio
| Prop | Type | Default |
|---|---|---|
children | ReactNode | required |
ratio | number | 16 / 9 |
width | number | 80 |