Loading

A spinner. Inherits currentColor, so color it with a text-* utility or let it match the surrounding text.

Sizes

Real use · inline with text, and colored

Loading your dashboard…Syncing changes…

Button's built-in spinner (for comparison)

Using Loading

Silica ships one design system through three paths. They share a class vocabulary but are not interchangeable — pick the one that matches what you are building.

Plain HTML — CSS classes

The Tailwind v4 plugin. Works in any framework or none — Rails, Django, PHP, Go, a static file. This path is complete for Loading — it needs no JavaScript, so the classes below are the whole story.

/* in your CSS */
@import "tailwindcss";
@plugin "@wizeworks/silicaui";

Root class loading, with 5 modifiers:

  • .loading
  • .loading-lg
  • .loading-md
  • .loading-sm
  • .loading-xl
  • .loading-xs

React

Typed components over those same classes, with behavior and accessibility from Base UI.

npm i @wizeworks/silicaui-react
import { Loading } from "@wizeworks/silicaui-react";

Props

PropTypeRequiredDescription
sizeLoadingSizenoDefault md.
labelstringnoAccessible label announced to assistive tech. Default "Loading".

Source of the demo above

The exact file that renders the examples above, so it can never drift from them. It imports a few of this site’s own layout helpers (../lib/…), so read it for the component calls rather than copying it whole.

Show source
import { Loading, Button } from "@wizeworks/silicaui-react";
import { Section, Row } from "../lib/Section";
import { SIZES } from "../lib/data";

export function LoadingDemo() {
    return (
        <>
            <Section title="Sizes">
                <Row>
                    {SIZES.map((size) => (
                        <Loading key={size} size={size} />
                    ))}
                </Row>
            </Section>

            <Section title="Real use · inline with text, and colored">
                <div className="flex flex-col gap-2 text-sm">
                    <span className="flex items-center gap-2">
                        <Loading size="sm" />
                        Loading your dashboard…
                    </span>
                    <span className="flex items-center gap-2 text-primary">
                        <Loading size="sm" />
                        Syncing changes…
                    </span>
                </div>
            </Section>

            <Section title="Button's built-in spinner (for comparison)">
                <Row>
                    <Button color="primary" loading>
                        Saving…
                    </Button>
                </Row>
            </Section>
        </>
    );
}

Vanilla — node tree to HTML

Feedback leaves — colorless status surfaces (class carries size/variant). Build a node tree, project it with toHtml(), and let the zero-dependency runtime hydrate it. This is the path for generated or user-authored documents — a site builder, CMS output, a static export.

npm i @wizeworks/silicaui-html @wizeworks/silicaui-behaviors
import { atom, toHtml } from "@wizeworks/silicaui-html";

const node = atom("Loading", "loading", { /* props */ });
const markup = toHtml(node);

Styling on this path is the class string in the second argument — the same classes as the Plain HTML section above. There is no color prop here; write "loading loading-primary" rather than passing a colour as a prop.

Takes children
no
Hydrated by
nothing — this one is static markup

The full API for Loading, on every path, is available through the Silica MCP server.