Next.js Discord

Discord Forum

shadcn skeleton auto-height

Answered
Tonkinese posted this in #help-forum
Open in Discord
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
Answered by joulev
try (i havent tested this) <Skeleton className="w-full aspect-video rounded-full" />
View full answer

3 Replies

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