shadcn skeleton auto-height
Answered
Tonkinese posted this in #help-forum
TonkineseOP
Hey guys, is it possible to assign an auto-height to https://ui.shadcn.com/docs/components/skeleton ? (e.g. if the image aspect ratio is 16:9, and the width is full, the height should adjust to that proportion)
thanks
thanks
Answered by joulev
try (i havent tested this)
<Skeleton className="w-full aspect-video rounded-full" />3 Replies
@Tonkinese Hey guys, is it possible to assign an auto-height to https://ui.shadcn.com/docs/components/skeleton ? (e.g. if the image aspect ratio is 16:9, and the width is full, the height should adjust to that proportion)
thanks
try (i havent tested this)
<Skeleton className="w-full aspect-video rounded-full" />Answer
shadcn skeleton is just a single <div>, style it the way you style any <div>
@joulev try (i havent tested this) `<Skeleton className="w-full aspect-video rounded-full" />`
TonkineseOP
based and FAANG pilled, thanks joulev