Indeterminate loader for operations without a known duration. Eight dots orbit with a cascade pulse. Styles live in scss/components/_loader.scss. When you can show percent complete, use Progress instead.
Sizes and types
Four footprints (24 to 48px) and two color treatments. Each loader needs role="status" and an accessible name via aria-label.
Eight orbiting dots with staggered pulse animation. Use loader--primary on brand surfaces; loader--secondary on muted backgrounds.
In context
Pair the loader with aria-busy="true" on the loading region. Hide the loader with the hidden attribute when idle so assistive tech is not announced repeatedly.
Dashboard summary
Placeholder content while data loads.
<div class="loader loader--32 loader--primary" role="status" aria-live="polite" aria-label="Loading"><span class="loader__dot" aria-hidden="true"></span><span class="loader__dot" aria-hidden="true"></span><span class="loader__dot" aria-hidden="true"></span><span class="loader__dot" aria-hidden="true"></span><span class="loader__dot" aria-hidden="true"></span><span class="loader__dot" aria-hidden="true"></span><span class="loader__dot" aria-hidden="true"></span><span class="loader__dot" aria-hidden="true"></span></div>
Behavior in your app
Copy docs-site/src/lib/loader-behavior.ts and call wireAllLoaders() after load, or toggle aria-busy and hidden from your data layer.
import { setLoaderBusy, wireAllLoaders } from './loader-behavior';
wireAllLoaders();
// Or control a region directly:
const panel = document.getElementById('my-panel');
setLoaderBusy(panel, true);
// … fetch …
setLoaderBusy(panel, false);
Class reference
| Class | Description |
|---|---|
.loader | Inline host for eight .loader__dot elements |
.loader--48 … .loader--24 | Footprint and dot size tokens |
.loader--primary | Brand action color (--surface-action) |
.loader--secondary | Neutral orbit (--neutral-400) |
.loader__dot | Pulsing dot (decorative, aria-hidden) |
data-loader-live | Doc region wired by wireAllLoaders() |
data-loader-toggle | Button toggles busy state on data-loader-target |
Customize (Sass)
-
Loader layout
Override footprint, dot size, and orbit distance before importing components.@use "pimentcss-design-system" with ( $loader-size-48: 3.5rem, $loader-dot-32: 5px, $loader-orbit-ratio: 0.4 ); -
Rebuild CSS
Run after editing _loader.scss.npm run build:css
Accessibility (RGAA / WCAG)
Loaders
- Status, use
role="status"with a concisearia-label(for example “Loading”). Addaria-live="polite"when the loader can appear dynamically. - Busy region, set
aria-busy="true"on the container while content loads; remove it and hide the loader when done. - Dots, mark each
.loader__dotwitharia-hidden="true"; do not expose eight separate elements to screen readers. - Known duration, prefer Progress with
role="progressbar"when a percentage is available.