Skeleton revealPro
Loading skeletons that grow into the real content block by block: each placeholder stretches to the content's box while it fades and the content sharpens out of a blur.
oxyn add skeleton-revealAdded a single-flight lock around refresh() so two tabs share one request, and a retry for the call that waited. 148 tests pass.
Toggle Loading to watch blocks resolve one after another.
The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.
Rendered from Rust at build time · goes live when visible
When to use
- A card or panel whose content arrives a moment later: the skeleton should already be the shape of the content, then become it block by block instead of swapping all at once.
When not to use
- Grey shapes the size of what they stand in for, one sheen sweeping across all of them in step (or a staggered pulse), shown only after a short delay, then a crossfade into the content: use Skeleton instead.
- Fourteen text-glyph loaders (braille, sand, blocks, scanner…) that settle into a check, a warning or a cross when the agent finishes, waits or fails: use Glyph loader instead.
- A dot and a label for any of the 13 agent states, as a pill, inline or a dot alone: use Status indicator instead.
Installation
Skeleton reveal is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.
oxyn add skeleton-revealUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Resolve
Blocks resolving in order.
Added a single-flight lock around refresh() so two tabs share one request, and a retry for the call that waited. 148 tests pass.
Toggle Loading to watch blocks resolve one after another.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Loading
Size-matched skeletons.
Toggle Loading to watch blocks resolve one after another.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Fast
A 40 ms stagger, no chart.
Added a single-flight lock around refresh() so two tabs share one request, and a retry for the call that waited. 148 tests pass.
Toggle Loading to watch blocks resolve one after another.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
SkeletonReveal
| Prop | Type | Default | Description |
|---|---|---|---|
loadingrequired | bool | — | Loading. |
stagger | u32 | 40 | Ms between blocks (40). |
loading_label | String | "Loading" | Status read while loading. |
width | f32 | 340.0 | Width px. |
childrenrequired | Element | — | `MorphBlock`s and layout. |
MorphBlock
| Prop | Type | Default | Description |
|---|---|---|---|
indexrequired | usize | — | Order in the reveal. |
width | String | "100%" | Skeleton width (`100%`, `64px`). |
height | f32 | 12.0 | Skeleton height px (or the lines' height). |
radius | String | "6" | Corner radius px; `circle` for an avatar. |
lines | Option<usize> | Default::default() | Text lines (each a bar in its line box; the last of several is shorter). |
line_height | f32 | 20.0 | Line height px. |
class | String | Default::default() | Extra class. |
children | Element | Default::default() | The loaded content. |
Read from the Rust signature and doc comments.
Accessibility
- aria-busy with a hidden status while loading; content isn't rendered until ready, so nothing half-loaded is read.
- Blocks keep reading order.
From the spec
While loading the region is aria-busy with a hidden status; content is not rendered until ready, so nothing half-loaded is announced. Reduced motion fades without stretching or blur.
Motion & interaction
Each placeholder stretches to the real content's box and fades while the content sharpens out of a 4 px blur; blocks start stagger apart in reading order (avatar, title, meta, body, chart, buttons).
Timing
| Transition | Duration | Easing | Reduced motion |
|---|---|---|---|
| Block morph | 300 ms | ease.out | 120 ms fade, no blur |
| Stagger | 40 ms (Arc) | — | 0 |
| Back to loading | instant | — | instant |
Responsive behaviour
- Blocks size to their content once loaded; skeleton widths take percentages.
Edge cases (spec)
Blocks that load faster than the stagger still wait their turn. Text blocks set their line count; the last of several lines is shorter. Very long content grows the card after the morph.
Notes for AI
- Import
SkeletonReveal,MorphBlockfromoxyn_dioxusand includePRIMITIVES_CSSplus the token stylesheet once. - A GPUI version exists:
SkeletonRevealElinoxyn_gpui. - Props to set first:
loading,children,index. - Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.