Skip to content
Viewership Inquire
Astro UI

Loading State.

Pixel-grid loader with a shimmering label and elapsed timer.

FeedbackComponentNo dependencies Beautiful UI, MIT

.md
Drafting report 214

Install

  1. Import the foundation once

    foundation.css holds the tokens every component reads.

    Layout.astro
    ---
    // src/layouts/Layout.astro
    import "../styles/foundation.css";
    ---
  2. Copy LoadingState.astro

    Paste into src/components/viewership/loading-state/

  3. Use it

    Page.astro
    ---
    import LoadingState from "../components/viewership/loading-state/LoadingState.astro";
    ---
    
    <LoadingState />

Props 8

PropTypeDefaultDescription
variant "drive" | "dots" | "orbit" "drive" Grid pattern.
label string "Working" Status text, shown and announced.
elapsed boolean true Show the elapsed timer (needs JS).
startedAt number · Epoch ms the work started. Defaults to page load.
inline boolean false Render as an inline <span> inside text or a button.
shimmer boolean true Shimmer the label.
autoplay boolean true Animate the grid. Pauses offscreen.
announce boolean true Expose as role="status". Turn off inside a control that already reports busy.

Source 1 file

Ported from Beautiful UI, MIT. Notices.