gymnopedies
uiaspect-ratiosource: ok · hit
Aspect Ratio
Aspect Ratio — gymnopédies-themed shadcn primitive.
npx shadcn add "https://gymnopedies.shoota.work/r/aspect-ratio.json"free
No selection tags yet — empty means no evidence, not lack of support.
Dependencies
Bundle weight · lightRegistry dependencies
https://gymnopedies.shoota.work/r/utils.json
Files1 · source cached 10/8/2026, 10:25:12 PM
src/components/ui/aspect-ratio.tsx
import { cn } from "@/lib/utils"
function AspectRatio({
ratio,
className,
...props
}: React.ComponentProps<"div"> & { ratio: number }) {
return (
<div
data-slot="aspect-ratio"
style={
{
"--ratio": ratio,
} as React.CSSProperties
}
className={cn("relative aspect-(--ratio)", className)}
{...props}
/>
)
}
export { AspectRatio }