Placeholders
Grey bars in the shape of content that is on its way - the first load of a page or a panel. A region that already has content and reloads it gets an overlay instead: see Busy.
Examples
Each bar is a placeholder sized by a width utility. They pulse slowly, and stand still for people who ask for less motion.
<section class="card" aria-label="Loading">
<div class="card-header"><span class="placeholder w-25"></span></div>
<div class="card-body vstack gap-8">
<span class="placeholder w-75"></span>
<span class="placeholder w-50"></span>
<span class="placeholder w-100"></span>
</div>
</section>Accessibility
- Placeholders are empty elements; the region holding them is named "Loading" until the content takes its place.
- Keep the shapes close to the real content, so the page does not jump when it arrives.
Tokens
From css/components/placeholder.css, which declares no custom property of its own.
It reads the theme's --redz-radius-6, --redz-border.
From Bootstrap 5.3
| Bootstrap 5.3 | REDZ.UI | Change | Note |
|---|---|---|---|
placeholder-glow | - | remove | placeholders pulse by themselves |
placeholder-wave | - | remove | placeholders pulse by themselves |
placeholder-xs | - | review | size by the height of the bar |