Displays content within a desired ratio.
View the full component source code below.
"use client"
import { AspectRatio as AspectRatioPrimitive } from "radix-ui"
function AspectRatio({
...props
}: React.ComponentProps<typeof AspectRatioPrimitive.Root>) {
return <AspectRatioPrimitive.Root data-slot="aspect-ratio" {...props} />
}
export { AspectRatio }
npx shadcn@latest add https://registry.mukoko.com/api/v1/ui/aspect-ratioFetch this component's metadata and source code from the registry API.
/api/v1/ui/aspect-ratiocomponents/ui/aspect-ratio.tsx