Skip to content

Skeleton Card Loader

Tailwind CSS skeleton loaders for an article card grid and a list, with pulse or shimmer animation that swaps to real content once loaded.

Also known as: skeleton loader, loading placeholder, skeleton screen, content placeholder, shimmer loading card

Skeleton Card Loader live demo

Open in new tab

Tailwind CSS code (HTML, CSS, JS)

Skeleton loaders for cards and lists built with Tailwind CSS and a few lines of vanilla JavaScript. Gray placeholder shapes mirror the final layout of an article grid and a contributor list, pulse while data is loading and are then swapped for the real content. Use them on blogs, dashboards and feeds to reduce layout shift and make loading feel faster than a spinner.

How it works

The root is .tsk-root. Inside it, the data-tsk-region wrapper holds two states: data-tsk-skeleton with the placeholders and data-tsk-content with the finished cards, which starts hidden. Each placeholder card is a .tsk-card with Tailwind's animate-pulse, and every shape inside it is a .tsk-bone: an aspect-video block for the image, rounded pills for tags, bars of different widths for the title and a circle for the avatar. The bones use the same spacing and sizes as the real article elements, so nothing jumps when content arrives.

On DOMContentLoaded the script calls load(), which shows the skeleton, sets aria-busy="true" and disables the Reload button (data-tsk-reload). After data-tsk-delay milliseconds showContent() hides the skeleton, reveals the content (which fades in through .tsk-fade) and announces the result. Clicking Reload runs the cycle again.

Customization

  • data-tsk-delay on .tsk-root: change the simulated loading time in milliseconds.
  • data-tsk-effect="shimmer" on .tsk-root: replace the pulse with a light sweep defined by tsk-shimmer in style.css.
  • bg-slate-200 on .tsk-bone: use bg-sky-100 or bg-zinc-300 for tinted or higher-contrast placeholders.
  • sm:grid-cols-2 lg:grid-cols-3 on both grids: change the column count, keeping skeleton and content in sync.
  • load() in script.js: replace the setTimeout with a fetch() call and build the cards before calling showContent().
  • Copy a .tsk-card block to add more placeholders, or delete the list card if you only need the grid.

Use cases

  • Blogs: gray placeholders mirror an article card grid while posts load
  • Dashboards: a contributor list skeleton pulses until real data replaces it
  • Feeds: shimmer animation makes loading feel faster than a spinner
  • Any data-driven page: matching the final layout reduces layout shift when content arrives

Accessibility

The skeleton is decorative and marked aria-hidden="true", so screen readers never read out empty shapes. The region carries aria-busy while loading, and a visually hidden role="status" element announces "Loading articles" and "Articles loaded". The Reload button is disabled during loading and has a visible focus ring, as do the article links. Under prefers-reduced-motion: reduce the pulse, shimmer and fade-in are all turned off.

Usage notes

Without JavaScript the skeleton stays visible, so render the real content on the server when possible and use the skeleton only for client-side loading. For several instances on one page, give each .tsk-root its own heading id.

Skeleton Card Loader at a glance

Framework
Tailwind CSS
Code
HTML, CSS, JavaScript
JavaScript
Vanilla JavaScript, no jQuery
Dependencies
Tailwind CSS
Layout
Responsive, works on mobile
Category
Skeleton Loaders
License
Free for personal and commercial use

Questions about this template

Can I use the Skeleton Card Loader code for free?

Yes. You can copy or download the code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my website?

Load Tailwind CSS from a CDN (the links are under Requirements). Paste the HTML where the component should appear, add the CSS to your stylesheet and load the JavaScript before the closing </body> tag. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. The script is plain vanilla JavaScript, so it works without jQuery, React or Vue. You can still use the markup inside those frameworks.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

Requirements

Add these to your page (already included in the download):

  • <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>

The Tailwind browser build is for prototyping. In production, compile Tailwind with its CLI or your bundler.

Skeleton Card Loader – free Tailwind CSS skeleton loader template
Skeleton Card Loader · free Tailwind CSS skeleton loader template

More Skeleton Loaders

Skeleton Product Grid – free Pure CSS skeleton loader template

Skeleton Product Grid

Pure CSS skeleton loader for a product grid with shimmering placeholder cards, a wave-like sweep and an accessible loading status.

Skeleton Table Loader – free Bootstrap 5 skeleton loader template

Skeleton Table Loader

Dark Bootstrap 5 table with shimmering skeleton rows that are replaced by member data, status pills and storage bars once loading finishes.

Shimmer Skeleton – free Pure CSS skeleton loader template

Shimmer Skeleton

Dark pure CSS skeleton screen for a profile card, article and comment list, with one synchronized shimmer sweep across every placeholder.