<div class="kw-skel-page" aria-busy="true" role="img" aria-label="Loading page 26 of Blank Pages">
<span class="kw-skel kw-skel-page__pageno"></span>
<span class="kw-skel-scene"><span class="kw-skel"></span></span>
<span class="kw-skel kw-skel--act is-gap"></span>
<span class="kw-skel kw-skel--act"></span>
<span class="kw-skel kw-skel--act-end"></span>
<span class="kw-skel kw-skel--cue is-gap"></span>
<span class="kw-skel kw-skel--paren"></span>
<span class="kw-skel kw-skel--dlg"></span>
<span class="kw-skel kw-skel--dlg"></span>
<span class="kw-skel kw-skel--dlg-end"></span>
<span class="kw-skel kw-skel--act is-gap"></span>
<span class="kw-skel kw-skel--act-end"></span>
<span class="kw-skel kw-skel--cue is-gap"></span>
<span class="kw-skel kw-skel--dlg"></span>
<span class="kw-skel kw-skel--dlg-end"></span>
<span class="kw-skel kw-skel--trans is-gap"></span>
<span class="kw-skel-scene is-gap" style="margin-top:16px"><span class="kw-skel"></span></span>
<span class="kw-skel kw-skel--act is-gap"></span>
<span class="kw-skel kw-skel--act-end"></span>
</div>
<div style="display:grid;gap:16px;flex:1 1 260px;min-width:0">
<div class="kw-skel-rows" aria-busy="true" role="img" aria-label="Loading the cast">
<div class="kw-skel-row"><span class="kw-skel kw-skel--circle"></span><span><span class="kw-skel kw-skel--title" style="width:45%"></span><span class="kw-skel" style="width:30%"></span></span></div>
<div class="kw-skel-row"><span class="kw-skel kw-skel--circle"></span><span><span class="kw-skel kw-skel--title" style="width:60%"></span><span class="kw-skel" style="width:25%"></span></span></div>
<div class="kw-skel-row"><span class="kw-skel kw-skel--circle"></span><span><span class="kw-skel kw-skel--title" style="width:38%"></span><span class="kw-skel" style="width:34%"></span></span></div>
</div>
<div class="kw-skel-card" aria-busy="true" role="img" aria-label="Loading an index card"><span class="kw-skel" style="width:40%"></span><span class="kw-skel kw-skel--title" style="width:80%"></span><span class="kw-skel" style="width:100%"></span><span class="kw-skel" style="width:70%"></span></div>
</div>
What it is
A placeholder drawn in the shape of the content that is about to arrive, so the layout does not jump when it does and the person knows what kind of thing is coming. For a wait of about one to four seconds.
The Kwark idea: the page’s own geometry
A screenplay page has a shape every writer knows before they can read a word: the heading flush left with scene numbers in both margins, action across the full width, the character cue far in, a parenthetical a little less, the speech in a narrower column, a transition at the right. Kwark’s skeleton draws those bars on the page’s real US Letter geometry (1.5in left margin, 1in right and top; cue at 3.7in, speech from 2.5in for 3.5in; EditorModule and Page reference: Highland). When page 26 arrives, each line lands where its bar was. The same idea gives the cast list round faces and two lines, and an index card its title line and two note lines.
When to use
- The first paint of a screenplay page that is not cached on this device.
- Lists and cards whose count and shape are known.
When not to use
- Under about a second: show nothing.
- When the page is cached: paint the cached page, then update it (Decision 0012).
- When the script is not on this device and cannot be fetched: say so with the banner and Try again; a skeleton that never resolves is a lie.
- For work with a known length: progress.
Motion
The bars breathe between full and half tone over 1.6s while aria-busy="true". No sweeping shimmer and no gradient. Under reduced motion they hold still.
Anatomy
- Bar: 8px tall (7px on the page, 12px for a title), 3px corners,
--k-textat 9% so it shows the same in light, dark and every room. - Page: 8.5 : 11,
--k-surface, 1px--k-line, 3px corners; padding 17.6% left, 11.8% right and top (1.5in, 1in, 1in). - Heading: 58% of the text column at 14% tone; scene-number marks 4.5% wide in both margins.
- Action: full width, the last line 64%.
- Cue: from 36.7% of the column, 17% wide. Parenthetical: from 26.7%, 22% wide. Speech: from 16.7%, 58% wide, the last line 36%.
- Transition: right-aligned, 16% wide. Page number: top right, 5% wide.
- Rhythm: 5px between lines of an element, 16px for a blank line.
- Rows: 56px, a 32px circle and two bars. Card: 5 : 3 stock with a top line, title and two notes.
Tokens
| Token | Light | Dark |
|---|---|---|
--k-text |
#0f172a | #e3e3e3 |
--k-surface |
#ffffff | #1a1a1a |
--k-line |
#e2e8f0 | rgba(255, 255, 255, .1) |
--k-radius-card |
10px | |
--k-ease-in-out |
cubic-bezier(.65, 0, .35, 1) | |
--k-space-2 |
8px | |
--k-space-3 |
12px | |
--k-space-4 |
16px |
React
Use the HTML below with kwark.css. The example shows the markup and styling. Supply any application behavior described on this page.
HTML and CSS
Works anywhere with kwark.css.
<div class="kw-skel-page" aria-busy="true" role="img" aria-label="Loading page 26 of Blank Pages">
<span class="kw-skel kw-skel-page__pageno"></span>
<span class="kw-skel-scene"><span class="kw-skel"></span></span>
<span class="kw-skel kw-skel--act is-gap"></span>
<span class="kw-skel kw-skel--act"></span>
<span class="kw-skel kw-skel--act-end"></span>
<span class="kw-skel kw-skel--cue is-gap"></span>
<span class="kw-skel kw-skel--paren"></span>
<span class="kw-skel kw-skel--dlg"></span>
<span class="kw-skel kw-skel--dlg"></span>
<span class="kw-skel kw-skel--dlg-end"></span>
<span class="kw-skel kw-skel--act is-gap"></span>
<span class="kw-skel kw-skel--act-end"></span>
<span class="kw-skel kw-skel--cue is-gap"></span>
<span class="kw-skel kw-skel--dlg"></span>
<span class="kw-skel kw-skel--dlg-end"></span>
<span class="kw-skel kw-skel--trans is-gap"></span>
<span class="kw-skel-scene is-gap" style="margin-top:16px"><span class="kw-skel"></span></span>
<span class="kw-skel kw-skel--act is-gap"></span>
<span class="kw-skel kw-skel--act-end"></span>
</div>
<div style="display:grid;gap:16px;flex:1 1 260px;min-width:0">
<div class="kw-skel-rows" aria-busy="true" role="img" aria-label="Loading the cast">
<div class="kw-skel-row"><span class="kw-skel kw-skel--circle"></span><span><span class="kw-skel kw-skel--title" style="width:45%"></span><span class="kw-skel" style="width:30%"></span></span></div>
<div class="kw-skel-row"><span class="kw-skel kw-skel--circle"></span><span><span class="kw-skel kw-skel--title" style="width:60%"></span><span class="kw-skel" style="width:25%"></span></span></div>
<div class="kw-skel-row"><span class="kw-skel kw-skel--circle"></span><span><span class="kw-skel kw-skel--title" style="width:38%"></span><span class="kw-skel" style="width:34%"></span></span></div>
</div>
<div class="kw-skel-card" aria-busy="true" role="img" aria-label="Loading an index card"><span class="kw-skel" style="width:40%"></span><span class="kw-skel kw-skel--title" style="width:80%"></span><span class="kw-skel" style="width:100%"></span><span class="kw-skel" style="width:70%"></span></div>
</div>
ARIA
- The skeleton is one
role="img"witharia-busy="true"and a label that says what is coming: Loading page 26 of Blank Pages. Its bars are not read. - When the content arrives, the label goes and the real content replaces it in place; focus does not move.
- If loading fails, the skeleton is replaced by a message with a way forward, never left on screen.
Motion
The breathing stops under prefers-reduced-motion.
Rules
- Must draw the skeleton in the real geometry of what is coming; the screenplay skeleton uses the page’s margins and element indents.
- Never show a skeleton for under a second or for content that is already cached.
- Never leave a skeleton on screen when loading fails; replace it with what happened and what to do.
- Must give the skeleton one accessible label naming what is loading, and hide its bars.
- Never use a gradient shimmer; the bars breathe in tone and stop under reduced motion.
AI readiness test
Task. Show page 26 of the screenplay while it downloads to a new laptop.
Give the agent. This page, Screenplay page, Loading pattern, Decision 0012.
Constraint. The download can fail on a train.
A reliable answer
- Page skeleton on US Letter geometry with heading, cue, speech and scene-number marks
- role=“img” with “Loading page 26”
- Replaced in place by the page
- On failure, a banner with Try again instead of the skeleton