Overview Button Copy button Field Input Number field Textarea Select Combobox Multiselect Date picker Date range picker Date-time picker Checkbox Radio group Position picker Switch Slider Dropzone Device controls Avatar Badge Card Collapsible Kbd Map Matrix Proportion bar Separator Stat Table Timeline Chat Playback Pagination Charts Chart theming Profile chart Time series chart Bar chart Isopleth chart TS diagram Box plot Rose chart Calendar chart Banner Toast Loader Progress Skeleton Empty state Error state Dropdown menu Tooltip Info tooltip Dialog Sheet Resizable Confirm dialog Breadcrumbs Command palette Mobile menu Navigation list Outline Scroll rail Sidebar Tabs
Skeleton
What a page shows while its data is on the way: the content's shape in faint bars, then the content itself, arriving in turn.
Loading pattern
Replay to watch it. The header and frame are real throughout.
Tables
TablePlaceholder draws the table it stands in for, with the same header snippet, and picks a bar per column. Then give the arriving rows an enterIndex. For a StickyTable, pass its columns too.
{#if loading}
<TablePlaceholder state="loading" cells={['text', 'muted', 'badge']} {head} label="Loading missions" />
{:else}
<Table>
<TableHeader>{@render head()}</TableHeader>
<TableBody>
{#each missions as mission, index (mission.id)}
<TableRow enterIndex={index}>…</TableRow>
{/each}
</TableBody>
</Table>
{/if} Anything else
Skeleton is one bar; size it with classes and pass its index so rows sweep in turn. Wrap the placeholder in appear-late, and give arriving items the enter class with --enter-index.
{#if loading}
<div class="appear-late" role="status" aria-busy="true" aria-label="Loading missions">
{#each { length: 4 }, index (index)}
<div aria-hidden="true">
<Skeleton {index} class="w-24" />
<Skeleton {index} class="w-40 opacity-60" />
</div>
{/each}
</div>
{:else}
{#each missions as mission, index (mission.id)}
<div class="enter" style="--enter-index: {index}">…</div>
{/each}
{/if} Rules
Wait a beat Placeholders hold back 120 ms (appear-late) and only fade in if the data is still on its way. A fast answer goes straight to content, with no flash of grey.
Shaped like the content Same frame, same header, same row height, bars where the text will be and badge-sized blocks where the badges will be. Nothing moves when the content lands.
Keep the chrome Titles, toolbars, filters and table headers are known before the data is: draw them for real. Only the data is a placeholder.
Arrive in turn Content that just arrived fades up item by item (enter, 40 ms apart, capped at 12). Only on arrival: not on rows scrolled to later, not when a filter changes.
Say it The placeholder region has role="status", aria-busy and a label like "Loading missions"; the bars themselves are hidden.
Reduced motion The sweep, the fade-in and the arrival all fall back to still. The utilities handle it.
Which one
Skeleton Content with a known shape: a table, a list, cards, a details panel. The default.
Loader A whole view with no shape to borrow yet, like a map or a chart, or a job that runs a while.
Spinner A small wait inside something that keeps its place: a button, a count.