Skeleton
A placeholder in the shape of the content that is loading.
Loading placeholder
Shapes match the content they stand in for, so the layout does not jump on arrival.
Usage
import { Skeleton } from '@oceanic-hub/brand-system'Match the real content's shape and size so the layout does not jump when data arrives. A skeleton is for a first load; for a refresh of content already on screen, leave the content and show progress somewhere quiet.
It is the middle of three loading/absent states, and the other two are named so the choice is
never a guess: reach for Spinner when you do not yet know the shape of what is coming — a
button mid-submit, a status line — and Empty when the request has already finished and there
is genuinely nothing to show. Skeleton is for the case in between: the shape is known before
the data is, so tracing it is more honest than either alternative.
Its pulse degrades under prefers-reduced-motion to a static surface — the placeholder is
still legible, because the shape carried the meaning, not the movement.
Two upstream examples are not shipped as demos. Text — three lines standing in for a
paragraph — is already the second half of the lead demo above, so a separate section would
repeat it. A table's loading state is these tracing the row shape that is about to
arrive — inside Table's own markup, or in DataTable's empty slot while the first page
is in flight. Upstream's Form example is the same composition one field at a time, and is not
shipped for the same reason. RTL is refused package-wide, recorded in pairings.json under
direction (@OCE-1779).
Avatar
A round skeleton beside two lines is the shape of a person row that has not resolved yet — reach for rounded-full here specifically, since every other skeleton in this package stays on the 6/8/12 radius scale.
On surface and elevated
The skeleton's fill is surface-sunken, chosen because it has to read on either ground it lands on — a plain card or a floating one. Side by side, on the SAME ground the skeleton once shipped invisible on (elevated is pure white in light mode): both blocks stay visible.
API Reference
See the Skeleton API page for every prop of every part, with types, defaults and the contract that pins them.