Bootstrap 5 Placeholder (Skeleton)
Bootstrap 5 Placeholder components (also called skeleton loaders) are animated grey blocks that mimic the shape of content before it loads, giving users immediate visual feedback that something is coming. They replace the jarring experience of blank screens or sudden content jumps by rendering a structural outline of cards, text, buttons, or images. Use them whenever your app fetches data asynchronously — dashboards, feed pages, profile views, or any component driven by an API call.
Primary Class
.placeholderCommon Use Cases
- →Rendering skeleton cards in an e-commerce product grid while prices and images load from a headless CMS or Shopify API
- →Displaying a skeleton user profile header (avatar circle, name line, bio lines) in a SaaS dashboard while the authenticated user's data is fetched on mount
- →Showing skeleton rows inside a data table while a filtered result set is being retrieved from a REST endpoint after the user applies a search query
- →Animating skeleton article cards in a news feed or blog listing page while paginated posts are lazy-loaded on scroll
Variants & Classes
| Variant | Description |
|---|---|
| Placeholder (Skeleton) Default | Standard placeholder (skeleton) with Bootstrap's default styling. |
| Placeholder (Skeleton) Responsive | Responsive variant that adapts to different screen sizes. |
Code Example
<div class="card" style="max-width: 360px;">
<div class="card-body">
<!-- Skeleton avatar + name -->
<div class="d-flex align-items-center gap-3 mb-3">
<div class="placeholder-glow">
<span class="placeholder rounded-circle" style="width:48px;height:48px;display:block;"></span>
</div>
<div class="flex-grow-1 placeholder-glow">
<span class="placeholder col-7 d-block mb-1"></span>
<span class="placeholder col-5 d-block"></span>
</div>
</div>
<!-- Skeleton body text -->
<div class="placeholder-glow mb-3">
<span class="placeholder col-12 d-block mb-1"></span>
<span class="placeholder col-10 d-block mb-1"></span>
<span class="placeholder col-8 d-block"></span>
</div>
<!-- Skeleton image block -->
<div class="placeholder-glow mb-3">
<span class="placeholder col-12 d-block" style="height:160px;border-radius:6px;"></span>
</div>
<!-- Skeleton action buttons -->
<div class="d-flex gap-2 placeholder-glow">
<a class="btn btn-primary disabled placeholder col-4" aria-disabled="true"></a>
<a class="btn btn-outline-secondary disabled placeholder col-3" aria-disabled="true"></a>
</div>
</div>
</div>Live Examples
Basic Placeholder (Skeleton)
Canvas Framework Variants
The Canvas template extends Bootstrap 5 with 1,658+ component variants. Generate any of these using Canvas Builder:
- ✓Canvas Builder generated placeholder (skeleton) with custom colours
- ✓Placeholder (Skeleton) with interactive states
- ✓Responsive placeholder (skeleton) for all screen sizes
Best Practices
Match skeleton shape to real content dimensions
Set explicit heights on skeleton spans that represent images or avatars (e.g. style="height:160px") so the layout doesn't shift when real content swaps in — this directly improves your Cumulative Layout Shift (CLS) score.
Choose glow over wave for subtlety
Bootstrap 5 offers placeholder-glow (opacity pulse) and placeholder-wave (shimmer sweep). Use placeholder-glow for dense dashboards where multiple skeletons coexist; the simultaneous shimmer of placeholder-wave across many elements can feel distracting.
Vary column widths to look natural
Stagger text line widths using col-12, col-10, col-7 in sequence — uniform full-width lines look artificial and make the skeleton feel broken rather than intentional.
Disable interactive elements during loading
Apply the disabled class alongside placeholder to any button or link skeletons, and add aria-disabled="true" so screen readers correctly communicate that the action is not yet available.