Layoutsrc/components/ui/aspect-ratio.tsx
Aspect Ratio
Keeps media and custom content within a consistent ratio.
Preview
Installation
Copy the component source into your project with `degit`. This port is intentionally not distributed as an npm package.
bunx degit https://github.com/LiasCode/shadcn-preact/src/components/ui#main ./src/components/uiUsage
import { AspectRatio } from "@/components/ui/aspect-ratio"
export function Example() {
return <AspectRatio>Aspect Ratio</AspectRatio>
}API Reference
ExportPurpose
AspectRatioComposable part exported by `@/components/ui/aspect-ratio`.