Loading States
Spinner, skeleton, shimmer, and overlay patterns for indicating loading states.
Overview
Vanilla Breeze provides multiple loading state patterns for different contexts:
- Spinner — Inline animated indicator for buttons, text, or overlays
- Skeleton — Content-shaped placeholders that show layout structure
- Shimmer — Animated overlay on existing content
- Progress ring — Circular determinate/indeterminate progress
Inline Spinner
Use <loading-spinner> inline with text or inside buttons to indicate an ongoing operation.
Skeleton Loading
Add data-loading="skeleton" to show children as gray placeholder shapes that preserve the layout structure.
Placeholder heading
Placeholder paragraph text that shows as a gray bar.
Another paragraph of placeholder text.
Shimmer Overlay
The data-loading attribute (without a value, or with "minimal" or "hide") adds an animated overlay on top of existing content.
Spinner Overlay
Add data-overlay to a spinner to center it over a parent container with a translucent backdrop.
Progress Indicators
For determinate progress, use <progress-ring> or the native <progress> element.
Usage Guidelines
- Spinner: Use for short, indeterminate operations (fetching data, saving)
- Skeleton: Use for initial page loads where content structure is known
- Shimmer: Use for refreshing existing content (data reload)
- Progress ring: Use when you can track completion percentage
- All patterns respect
prefers-reduced-motion: reduce - Always include appropriate ARIA attributes for screen readers
Related
loading-spinner
CSS-only spinner element
progress-ring
Circular progress indicator
progress
Native progress bar
Skeleton Pattern
Full skeleton loading pattern