shadcn.io is not affiliated with official shadcn/ui
Skeleton examples · Card
Simple Card with Image and Text Skeleton for React
A card placeholder with a wide image block above two lines of text.
The smallest card placeholder: a tall image block and two lines of text under it, the second one shorter. Three Skeleton elements in a column, with no border around them.
Use it for post previews, product tiles or media grids while their images and titles load.
Preview
Installation
FAQ
What wraps the image and the lines?
flex w-full max-w-sm flex-col gap-3. There is no border on the wrapper. The image and the two lines stack with gap-3.
How big is the image bar?
h-48 w-full. It uses the default radius and bg-muted from Skeleton. Match h-48 to the image you render.
Why are the two text lines different widths?
h-4 w-3/4 then h-4 w-1/2. The second bar is shorter, so the pair reads as a title and a short line under it.
Where does the pulse come from?
animate-pulse on Skeleton, with data-slot="skeleton". Edit the skeleton file under components/ui to change the pulse or the bg-muted fill for every bar.
Related
- Vertical Card Layout SkeletonA vertical card placeholder with an
- Horizontal Card Layout SkeletonA horizontal card placeholder with a
- Card with Avatar and Content SkeletonA bordered card placeholder with a round
- Simple List Items SkeletonFive list rows, each with a small icon
- Standard CardA basic card with a title, a description
- Input Fields SkeletonThree label and input placeholders