Skeleton

An animated placeholder for loading content.

Shapes

Real use · loading card

Using Skeleton

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 Skeleton — it needs no JavaScript, so the classes below are the whole story.

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

Root class skeleton, with 2 modifiers:

  • .skeleton
  • .skeleton-circle
  • .skeleton-text

React

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

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

Props

PropTypeRequiredDescription
shapeSkeletonShapenoblock (default, --radius-field), circle (avatar/dot placeholder), or text (a pill-rounded line sized in em). Give it dimensions with utilities or inline style.

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 { Skeleton } from "@wizeworks/silicaui-react";
import { Section, Row } from "../lib/Section";

export function SkeletonDemo() {
    return (
        <>
            <Section title="Shapes">
                <Row>
                    <Skeleton className="h-6 w-32" />
                    <Skeleton shape="circle" className="h-12 w-12" />
                    <Skeleton shape="text" className="w-40" />
                </Row>
            </Section>

            <Section title="Real use · loading card">
                <div className="flex max-w-sm flex-col gap-3 rounded-box border border-base-300 p-4">
                    <div className="flex items-center gap-3">
                        <Skeleton shape="circle" className="h-10 w-10" />
                        <div className="flex flex-1 flex-col gap-2">
                            <Skeleton shape="text" className="w-32" />
                            <Skeleton shape="text" className="w-20" />
                        </div>
                    </div>
                    <Skeleton className="h-32 w-full" />
                    <Skeleton shape="text" className="w-full" />
                    <Skeleton shape="text" className="w-2/3" />
                </div>
            </Section>
        </>
    );
}

Vanilla — node tree to HTML

Skeleton — lowers to <div>, carrying props.text as its content. 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("Skeleton", "skeleton", { /* 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 "skeleton skeleton-primary" rather than passing a colour as a prop.

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

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