Build a page from the markup you will keep, with placeholder images and text, a wireframe rendering for early review and skeleton states for content that loads late.
Placeholder text
Add data-lorem to an element and the script fills it. The value says how much text. Anything already inside the element is replaced, and the element is marked translate="no" so translation tools leave it alone.
<h2 data-lorem="heading"></h2><p data-lorem></p><p data-lorem="3 sentences"></p><ul data-lorem="5 items"></ul>
| Value |
Result |
| None | 50 words |
A number, such as 20 | That many words |
3 sentences | That many sentences |
heading | Five words |
5 items | That many <li> elements, one sentence each, in a <ul> or <ol> |
cjk (Japanese), chinese, korean, arabic, hebrew, cyrillic, latin | A paragraph in that script |
Other scripts
The text follows the nearest lang attribute. Japanese and Chinese each get filler in their own language, counted in characters because neither puts spaces between words. The Chinese filler is in Simplified characters. Korean gets Korean filler, counted in words. Arabic, Persian and Urdu get Arabic filler, and Hebrew gets Hebrew filler. Russian, Ukrainian, Bulgarian and Serbian get Russian filler. Every other language gets Latin. Use it to check line length, line height and direction before translated content exists.
<p lang="ja" data-lorem></p><p lang="ar" dir="rtl" data-lorem="2 sentences"></p>
Wireframe mode
data-wireframe redraws the page as a sketch: grey fills, outlined boxes, no shadows, and images replaced by crossed boxes. The markup does not change, so a review of the wireframe is a review of the real structure. It needs the development add-on.
<html lang="en" data-wireframe="lo"> <section data-wireframe="mid"> ...</section>
Levels
| Value |
Text |
Boxes |
Use it to review |
lo |
Scribbles (the Redacted Script font) |
Solid lines, black and white only |
Placement and proportion, with nothing to read |
mid |
Solid blocks (the Flow Block font) |
Dashed, grey |
Hierarchy and the amount of content |
hi |
Your fonts, readable |
Thin dashed lines, with images faded |
Wording and flow, before color and imagery |
annotate |
Your fonts |
Dashed, each with its tag name |
The elements used |
| No value |
Your fonts |
Dashed, grey |
The same as mid without the block font |
On <html> the page also turns grey and a badge in the corner names the mode. On a container only that region changes. The overview demo switches one region between the levels.
Switching from script
The add-on's script puts a wireframe object on window.VanillaBreeze and binds Ctrl or Cmd + Shift + W to turn the mode on and off for the page.
const { wireframe } = window.VanillaBreeze; wireframe.toggle(); wireframe.toggle('lo'); wireframe.setFidelity('hi'); wireframe.isActive(); wireframe.getFidelity();
Labels and review notes
Three more attributes carry what a reviewer needs to know. They come with the development add-on.
| Attribute |
Shows |
data-wf-label="Hero" |
A name badge in the corner of that element, inside a wireframe |
data-wf-annotate on <html> or a container |
Tag-name labels on sections and layouts, at any level |
data-wf-callout="Needs a second image" |
A numbered marker on the element and the note in a list at the end of the page, once you call wireframe.toggleCallouts() |
The data-wireframe reference covers the label and callout methods, the data-wf-palette colors and the tokens the mode reads.
Skeleton states
A skeleton is for the running page, not the design review: it holds the shape of content that has not arrived. Put data-loading="skeleton" on a container and each child becomes a grey block of its own size with a moving highlight. The highlight stops when the reader asks for reduced motion. Remove the attribute when the content is ready.
<article data-loading="skeleton" aria-busy="true"> <h3>The Lighthouse Keeper's Almanac</h3> <p>Ines Calloway, hardback, 320 pages.</p> <img data-mock="card" alt="Book cover"></article>
The blocks take their size from the children, so give the container content of about the right length. aria-busy is yours to set and remove. data-loading lists the other loading styles.
Placeholder URLs in script
When script builds the page, there is no element to put data-mock on yet. The development add-on's script adds VanillaBreeze.mock, which returns the same picture URLs as strings.
const { mock } = window.VanillaBreeze; mock.imageUrl({ width: 400, height: 300, seed: 42 }); mock.imageUrl({ service: 'placehold', width: 400, height: 300, text: 'Hero' }); mock.portraitUrl('Ines Calloway', 256);
From prototype to release
- Give each image its
src and remove data-mock. Keep width, height and alt, and check that the alt text describes the real picture.
- Write the real text into each element and remove
data-lorem. If the attribute stays, the script replaces your text.
- Remove
data-wireframe and the data-wf-* attributes, and take the development add-on's stylesheet and script out of the page.
<img data-mock="card" alt="Featured book"><p data-lorem="2 sentences"></p> <img src="/images/almanac-cover.webp" width="400" height="225" alt="Cover of The Lighthouse Keeper's Almanac"><p>A year on a rock in the North Sea, told month by month.</p>
A search of the project for data-mock and data-lorem finds anything left behind.
A whole page
This page uses placeholder media and text throughout. The control at the top turns wireframe mode on and sets the level.