Profile Skeleton
A skeleton loader for profile cards: pulsing avatar circle with shimmer text lines.
<div class="w-full max-w-sm min-w-0 mx-auto rounded-2xl border border-slate-200 bg-white p-4 overflow-hidden" aria-busy="true">
<div class="flex min-w-0 items-center gap-4">
<div class="h-12 w-12 shrink-0 rounded-full bg-slate-300 animate-pulse"></div>
<div class="w-full min-w-0 space-y-2">
<div class="h-4 w-56 max-w-full rounded bg-slate-300 animate-pulse"></div>
<div class="h-3 w-72 max-w-full rounded bg-slate-300 animate-pulse"></div>
<div class="h-3 w-44 max-w-full rounded bg-slate-300 animate-pulse"></div>
</div>
</div>
</div>Free to use in personal and commercial projects. No attribution required.
Variants
Same component, different looks. Preview each one live and copy the code you like.
Shimmer
A sweeping shine feels more premium than a plain pulse on marketing pages.
Dark
For dark mode apps where a light gray skeleton would flash too bright.
Compact
Smaller footprint for comment lists and activity feeds with tight rows.
About this profile skeleton
A skeleton loader for profile card layouts shows a pulsing placeholder while user data loads: an avatar circle, a name bar, and a couple of text lines. It beats a bare spinner because the layout does not jump when the real content arrives, which is why social feeds and comment sections use profile skeletons.
This tailwind skeleton loader builds the avatar skeleton placeholder as a rounded-full div and the text as rounded bars with decreasing widths, all sharing animate-pulse. The widths mimic real content proportions: a shorter name bar, a role line, and a longer bio line. An aria-busy attribute tells assistive tech the region is loading.
Match the skeleton dimensions to the final content so the swap is invisible. Two or three skeleton rows suggest a list is coming; a full screen of them just looks broken. For a fancier profile shimmer loading effect, swap animate-pulse for a sweeping gradient animation defined in a style block.
When content loads asynchronously, the worst outcome is not the wait, it is the jump. Text the visitor started reading suddenly shifts down as images and cards pop in, which feels broken even when everything works. A skeleton reserves the exact space the content will occupy, so arrival is a paint swap instead of a reflow. It also changes how the wait feels: a shaped placeholder reads as nearly ready, while a bare spinner reads as not started.
The avatar is a rounded-full div and the text lines are rounded bars with decreasing widths, all in a muted slate tone with animate-pulse. The decreasing widths matter: a short name bar, a medium role line, and a longer bio line mimic the natural rag of real text. Because every bar shares the same pulse, the whole card breathes as one unit. An aria-busy attribute on the container tells assistive technology the region is still loading.
Match the skeleton count to the list you actually expect: three skeleton rows for a three-item feed, not ten. If the real list is long, stagger each row's animation with a small delay so the pulse ripples down like a wave. In dark mode, darken the bars to slate-700 so they sit naturally on the dark surface. And size the avatar circle to the exact pixel size of the real avatar, since even a small mismatch causes a visible jump.
The failure mode nobody plans for is the skeleton that outlives its data. When a request fails silently, the pulsing placeholders keep pulsing forever and the visitor stares at ghost content with no way forward. Always pair skeletons with a timeout that swaps to an error state, like a retry button, after several seconds. A skeleton is a promise that content is coming; break that promise loudly, not silently.
Where to use it
- ✓ Social media feeds
- ✓ Comment sections
- ✓ Team directories
- ✓ Messaging user lists
Customization tips
Replace animate-pulse with a custom shimmer keyframe for the classic sweep effect. Darken the bars to slate-700 for dark mode. Add or remove text lines to match the exact card you are replacing.
Design notes
When to use
Profile skeletons work when you know the layout before the data arrives, like a user card with an avatar circle and name bars, and the wait is a second or two. Showing the shape of what is coming feels faster than a bare spinner and prevents the layout jump when content lands. They fit feeds and dashboards that load user data asynchronously.
What to avoid
Do not show a skeleton for loads you cannot predict, because a skeleton that pulses forever is worse than an honest error message. Avoid skeletons for near-instant loads too, since a flash of placeholder followed by content feels glitchy. And the skeleton must match the final card shape, or the swap still causes a jarring jump.
Accessibility
Mark the container with aria-busy set to true and provide screen-reader text like Loading profile, so assistive technology does not read empty boxes. Disable the shimmer or pulse animation for users with prefers-reduced-motion.
Frequently asked questions
How do I make a skeleton loader for a profile card in Tailwind?
Combine a rounded-full avatar div with stacked rounded text bars of different widths, all using bg-slate-300 and animate-pulse. Wrap them in a flex row inside your card container.
Should I use animate-pulse or a custom shimmer animation?
animate-pulse is free and built into Tailwind, which is enough for most cases. A custom shimmer sweep looks more premium but needs extra keyframes, so reserve it for high-visibility loading states.
Should the skeleton match the final layout exactly?
Yes. Same avatar size, same line count, same spacing. The whole point of a skeleton is that content replaces it without any layout shift.
How do I make a shimmer skeleton loader with a moving gradient?
Apply a linear-gradient background with a light band in the middle, set background-size to 200 percent, and animate background-position from one side to the other with keyframes. This gives the classic sweeping shine that feels more alive than a plain pulse. Give the keyframes a unique name so they never collide with global animation names.
Are skeleton loaders accessible for screen readers?
Mark the loading region with aria-busy="true" and hide the decorative skeleton shapes with aria-hidden="true" so they are not announced as empty divs. When content loads, set aria-busy to false and let an aria-live="polite" region announce the arrival. Never leave aria-busy stuck on true, or assistive tech will report the page as perpetually loading.
Should skeleton loaders use text lines or block shapes?
Mimic the real layout: a circle where the avatar will be, a short line for the name, and longer lines for meta text. Users perceive layout-matched skeletons as the page nearly ready, which reduces perceived wait time. Generic identical bars everywhere read as a spinner with extra steps.