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.

Loading...

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 the native <progress> element. Add data-type="ring" for a circular variant.

67% Loading... 67%

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

Native progress bar and ring mode

Skeleton Pattern

Full skeleton loading pattern