data-wireframe
Wireframe mode for rapid HTML prototyping. Apply sketch-like rendering with four fidelity levels, dark mode support, and element labeling via a single data attribute.
Overview
The data-wireframe attribute converts any page or container into a sketch-like wireframe. It applies grayscale rendering, dashed borders, and hand-drawn fonts to help focus on layout and structure during prototyping.
Wireframe mode requires the dev CSS bundle. The JS API requires the dev JS bundle.
How It Works
- Add
data-wireframeto<html>for full-page wireframe, or to any container for scoped wireframing - CSS applies a grayscale filter, replaces fonts with sketch fonts, converts borders to dashed lines, and removes shadows
- Four fidelity levels control how abstract the rendering is
- Dark mode is supported via
data-mode="dark"or system preference
Attributes
| Attribute | Type | Description |
|---|---|---|
data-wireframe |
string | Fidelity level: lo, mid, hi, annotate, or empty (defaults to mid behavior). |
data-wf-label |
string | Element label text shown in annotate mode via ::before pseudo-element. |
data-wf-annotate |
boolean | Composable annotation layer. Unlike annotate fidelity, this overlays element labels on top of any fidelity level. Uses ::after so it coexists with data-wf-label badges. |
data-wf-callout |
string | Design review comment. JS renders a numbered <mark> marker and collects text into a footnote panel. |
Fidelity Levels
| Level | Fonts | Borders | Colors | Best For |
|---|---|---|---|---|
lo |
Redacted Script (scribble) | Rough dashed | Pure B&W | Early concept sketches |
mid (default) |
Flow Block | Dashed | Grayscale | Layout review |
hi |
System fonts | Subtle | Near-production | Content review, stakeholder demos |
annotate |
System fonts | Labeled | Grayscale + labels | Design specs, developer handoff |
Element Labels
Add data-wf-label to any element to show a label badge in annotate mode. The JS API can also auto-label elements using their alt text (images) or explicit labels.
JavaScript API
The VanillaBreeze.wireframe object provides programmatic control. Available when the dev JS bundle is loaded.
Toggle
Query State
| Method | Returns | Description |
|---|---|---|
toggle(level?) |
boolean |
Toggle wireframe on/off. Returns whether now enabled. |
setFidelity(level) |
void |
Set fidelity. Pass empty string to disable. |
isActive() |
boolean |
Check if wireframe mode is active. |
getFidelity() |
string|null |
Get current fidelity level. |
labelElements() |
void |
Auto-label elements with data-wf-label and images with alt text. |
label(target, text) |
void |
Label a specific element or CSS selector. |
toggleAnnotations() |
boolean |
Toggle composable annotations. Returns whether now enabled. |
addCallout(target, text) |
void |
Attach a design review comment to an element. |
removeCallout(target) |
void |
Remove a callout from an element. |
renderCallouts() |
void |
Inject numbered <mark> markers on all [data-wf-callout] elements. |
renderCalloutPanel(container?) |
void |
Render <aside> footnote panel with ordered list of callout texts. |
toggleCallouts() |
boolean |
Toggle callout markers and panel visibility. Returns whether now visible. |
Composable Annotations
The data-wf-annotate attribute layers element labels on top of any fidelity level. Unlike the annotate fidelity mode, this lets you see lo-fi or hi-fi styling with labels overlaid.
Annotations use ::after pseudo-elements (positioned top-right), so they never collide with data-wf-label badges (which use ::before, top-left). Both can appear simultaneously on the same element.
Callouts & Comments
The callout system adds design review comments to wireframe elements. This creates a three-tier overlay model:
| System | Attribute | Purpose | Rendering |
|---|---|---|---|
| Labels | data-wf-label |
"What this IS" — structural name | ::before badge, top-left inside |
| Annotations | data-wf-annotate |
"What tag this uses" — developer reference | ::after monospace label, top-right outside |
| Callouts | data-wf-callout |
"What a reviewer thinks" — design comments | Injected <mark> numbered marker + footnote panel |
All three can be active simultaneously without collision.
Dark Mode
Wireframe tokens automatically invert for dark mode, either via the data-mode="dark" attribute or prefers-color-scheme: dark media query.
CSS Tokens
Wireframe mode exposes custom properties you can use or override in your own styles.
Keyboard Shortcut
Ctrl+Shift+W (or Cmd+Shift+W on macOS) toggles wireframe mode. This is auto-registered when the dev JS bundle loads.
Palette Variants
Override the default grayscale palette with themed color sets. Pure CSS, no JS needed.
| Palette | Description |
|---|---|
blueprint | Blue-toned wireframe, reminiscent of architectural drawings |
sepia | Warm paper-toned wireframe for a classic sketch feel |
Grid & Spacing Overlays
Debug overlays that work independently of wireframe mode.
| Attribute | Description |
|---|---|
data-show-grid | 12-column grid overlay for layout alignment |
data-show-spacing | Box-model outline on all elements |
Integration with Prototyping Tools
Wireframe mode works seamlessly with other prototyping attributes:
- data-mock — placeholder media adapts to wireframe tokens (fill, stroke, border)
- data-lorem — in
lofidelity, placeholder text gets abstract letter-spacing and reduced opacity
See the Prototyping Toolkit page for the full picture.
Accessibility
- Wireframe mode is a visual-only transformation — the DOM structure and ARIA attributes are preserved
- Screen readers are unaffected by wireframe rendering
- Labels use
::beforeand annotations use::afterpseudo-elements, not injected DOM nodes - Callout markers use semantic
<mark>elements witharia-label - The wireframe indicator badge at the bottom-right corner has
pointer-events: none