Skip to content
Vitops
GuidesComponentsPackagesThemeReferenceChangelog

Start here

VitopsInstallationStart a new EmDash siteYour design systemYour config

Live preview

Theme previewAnimation libraryIconsPatternsMastheadConfigure a site

Components

OverviewCSS classesWeb componentsAstro componentsBricks elementsEmDash blocks

Packages

@getvitops/cli@getvitops/astro@getvitops/vite@getvitops/generator@getvitops/core@getvitops/utils@getvitops/emdash@getvitops/create

Reference

Config referenceOutput formatsColour systemType & space scalesComponent patternsIconsConsent gateConversion trackingSearchLegal documentsCSS class vocabularyBricks elements

Releases

Changelog

Web components

Tier 2 — the wc-* elements: what each adds over its no-JS fallback, and which bundle it ships in.

Tier 2 exists only where a pattern genuinely benefits from progressive enhancement. The slotted markup is the fallback — semantic, accessible and usable with no JavaScript — and the element parses it and augments it in place. None of these render from empty, which is why the "what JS adds" column is the reason each one exists at all.

They use light DOM, so the framework CSS applies to both the fallback and the enhanced result, and ship as feature-detected, deferred ES-module bundles. Polyfills load only when a native feature is missing.

Which bundle

Most register in elements.js. Two ship separately and deliberately:<wc-consent> in its own Lit-free bundle, so a site that needs a consent gate isn't made to download a rendering framework and the gate can load ahead of the deferred Lit bundle it gates; and <wc-theme-editor>, which is tooling rather than a page pattern and is opt-in per consumer, so a production page that doesn't ask for it pays nothing.

wc-color-wheel, wc-oklch-color-picker are registered but in no bundle (the editor-v2 track). The tags are inert in a consumer project — they are listed so that "the tag does nothing" is documented rather than discovered.

<wc-cards>

Pattern
card
Ships in
elements.js
With no JS
full
What JS adds
whole-card click that keeps the card text selectable
Recommended call
<Cards> — it emits <wc-cards> itself, so do NOT add your own wrapper. <Subgrid> is the same grid without the click enhancement.
Also in
CSS, Astro, EmDash

<wc-carousel>

Pattern
carousel
Ships in
elements.js
With no JS
full
What JS adds
opt-in cloned loop, autoplay, and real prev/next + dot controls where ::scroll-button()/::scroll-marker are missing
Recommended call
<Carousel slides={…} label="…" /> — it emits <wc-carousel> itself, so do NOT add your own wrapper. .carousel is the shell and .carousel__track the scroller; add loop for the cloned infinite strip (autoplay implies it).
Also in
CSS, Astro, Bricks, EmDash

<wc-color-field>

Pattern
color-field
Ships in
@getvitops/core/color-field
With no JS
full
What JS adds
offers the OKLCH picker beside a colour text input: dragging writes the hex into the input, typing a hex moves the picker
Recommended call
Not written by hand: renderProjectionHtml wraps a color widget in it. The text input is the whole fallback (and the only submitted control); the picker is <wc-oklch-color-picker>, the control the theme editor uses. Load it with <ConfigForm colorPicker> or import "@getvitops/core/color-field". Its own bundle: the picker is a Lit element with a canvas, which a form with no colour field should not download.
Also in
this tier only

<wc-color-scheme-toggle>

Pattern
color-scheme-toggle
Ships in
elements.js
With no JS
partial
What JS adds
segmented light/dark/system control; persists the choice (consent-gated)
Recommended call
<wc-color-scheme-toggle></wc-color-scheme-toggle>. Renamed from <color-scheme-toggle> in 4.0. Shadow DOM, so it is absent rather than broken without JS.
Also in
CSS, Bricks

<wc-color-wheel>

Pattern
color-wheel
Ships in
no bundle — inert
With no JS
none
What JS adds
hue/chroma wheel with harmony strategies (complementary, triad, …)
Recommended call
Not shipped. Registered by its own module and imported by nothing yet, so the tag is inert in a consumer project.
Also in
this tier only

<wc-combobox>

Pattern
combobox
Ships in
elements.js
With no JS
full
What JS adds
a filtered ARIA 1.2 listbox (aria-activedescendant, arrow/Enter/Escape keys, a live result count) in place of the browser datalist popup
Recommended call
<Combobox name inputId options={[…]} /> with your own <label for>. With no JS it is an <input list> + <datalist>: native autocomplete. What is typed is what is submitted, so it suggests and does not constrain; use <select> for a closed set. Do NOT wrap it in <wc-combobox>: it emits its own. By hand: <wc-combobox class="combobox"><input class="combobox__input" list="x"><datalist id="x">…</datalist></wc-combobox>.
Also in
CSS, Astro

<wc-config-form>

Pattern
config-form
Ships in
@getvitops/core/config-form
With no JS
full
What JS adds
validates the form against a JSON Schema as you type and shows each message in its <wc-field>, stops a submit that has errors, adds a row to a keyed map as the blank one is used (until <wc-multifield> takes over), and exposes the config document the form describes
Recommended call
<ConfigForm id schema paths output><form method="post">…</form></ConfigForm>, with the fields from renderStepHtml / renderProjectionHtml (@getvitops/utils/forms). With no JS it is a plain form posting the names formToConfig parses and the server validates. Its own Lit-free bundle (@getvitops/core/config-form): the validator and the form codec. Do NOT wrap it in <wc-config-form>: it emits its own. paths narrows the schema to the fields shown; novalidate lets the server decide a submit.
Also in
Astro

<wc-config-preview>

Pattern
config-preview
Ships in
@getvitops/core/config-preview
With no JS
none
What JS adds
previews a config form’s edits on the page it is made on: regenerates the design system’s token layers from the document the form describes and injects them after the page stylesheet, with a toggle and a reset
Recommended call
<ConfigPreview for="<wc-config-form id>" base="<script id>" /> beside a <ConfigForm>; it emits its own <wc-config-preview>, so do NOT wrap it. It loads @getvitops/generator/preview (a colour engine) only when the first edit arrives, and no JS means no preview, stated rather than excused. A contrast failure or an unknown palette hue is reported and the last good CSS stays.
Also in
Astro

<wc-consent>

Pattern
consent
Ships in
@getvitops/core/consent
With no JS
full
What JS adds
the permission gate itself — activates type="text/plain" tags on grant
Recommended call
<CookieConsent />. Its own Lit-free bundle so a site needing consent does not download a rendering framework.
Also in
CSS, Astro

<wc-contrast-toggle>

Pattern
contrast-toggle
Ships in
elements.js
With no JS
full
What JS adds
starts checked under prefers-contrast: more and remembers the choice (consent-gated); the checkbox already works with no JS
Recommended call
<ContrastToggle /> — it emits <wc-contrast-toggle> itself, so do NOT add your own wrapper. Set site.accessibility.contrastToggle: true so a baseline contrast miss warns instead of failing the build (the generated [data-contrast="more"] layer is the conforming version it switches to).
Also in
CSS, Astro

<wc-copy>

Pattern
copy
Ships in
elements.js
With no JS
partial
What JS adds
clipboard write plus success feedback
Recommended call
<wc-copy value="…"> around the text to copy; the element renders its own button and announces "Copied" or "Copy failed" (copied-label / failed-label set the words).
Also in
CSS, Bricks, EmDash

<wc-counter>

Pattern
counter
Ships in
elements.js
With no JS
full
What JS adds
animates from a start value to the value already in the fallback text, on intersection
Recommended call
<Counter value="94%" /> — it emits <wc-counter> itself, so do NOT add your own wrapper. The final value is parsed from the fallback text, never passed separately.
Also in
CSS, Astro, EmDash

<wc-dismissable>

Pattern
dismissable
Ships in
elements.js
With no JS
partial
What JS adds
fade-out + removal, optional auto-dismiss
Recommended call
<wc-dismissable> around any banner/notification containing a [data-dismiss] control.
Also in
CSS, Bricks, EmDash

<wc-entries>

Pattern
entries
Ships in
elements.js
With no JS
full
What JS adds
parses heading + <dl> pairs into a table above a breakpoint
Recommended call
<Entries entries={[{ heading, pairs: [{ term, value }] }]} /> — it emits <wc-entries> itself, so do NOT add your own wrapper. By hand: <wc-entries> around <h3> + <dl> pairs. The tier-2 exemplar: semantic pairs with no JS, a table with it.
Also in
CSS, Astro, Bricks, EmDash

<wc-field>

Pattern
field
Ships in
elements.js
With no JS
full
What JS adds
links the help text and the error to the control with aria-describedby, writes validation messages under the field once the control is left or a submit reports it, accepts setError() from a host that validates against a schema, and adds a maxlength counter
Recommended call
<Field label help error optional><input name … /></Field>: the label nests the control, so no id/for is needed. With no JS it is a labelled control and a server error is already under it. It is not form-associated: the native control still submits, validates and takes focus. Do NOT wrap it in <wc-field>: it emits its own. By hand: <wc-field class="field"><label class="field__control"><span class="field__label">Name</span><input name="n"></label><small class="field__help">…</small></wc-field>. Use .form-group for a field whose label and control are siblings.
Also in
CSS, Astro

<wc-format>

Pattern
format
Ships in
elements.js
With no JS
full
What JS adds
replaces the authored text with a locale-aware relative time, date, number, percentage or currency read from the machine value, and keeps a relative time current; fields limits a date to parts of it and now formats the current date, so a prerendered copyright year stays current
Recommended call
<Format type="relative" value="2026-11-03T14:05:00Z">November 3, 2026</Format>: the slot is the no-JS text, and title keeps it after upgrade. type is relative, date, datetime, time, number, percent or currency (needs currency="CAD"). fields="year" shows only those date parts and now formats the current date instead of value (<Format type="date" fields="year" now>2026</Format>). Anything it cannot format is left as written. Do NOT wrap it in <wc-format>: it emits its own. By hand: <wc-format type="relative"><time datetime="…">text</time></wc-format>.
Also in
Astro

<wc-gallery>

Pattern
gallery
Ships in
elements.js
With no JS
full
What JS adds
a real showModal() open, neighbour preload and the thumbnail→full-image view-transition morph
Recommended call
<Gallery images={…} label="…" /> — it emits <wc-gallery> wrapping a <Carousel /> (which emits its own <wc-carousel>) itself, so do NOT add your own wrapper around either. Each thumbnail is a plain <a href="#slide-id"> into the carousel's own <li id="slide-id"> inside a single <dialog class="lightbox-dialog"> (see lightbox), so it is a working modal lightbox — WITH prev/next — before any script runs. Stepping between images is the carousel's job, not the gallery's.
Also in
CSS, Astro, EmDash

<wc-image-compare>

Pattern
image-compare
Ships in
elements.js
With no JS
full
What JS adds
drag handle revealing the before/after image
Recommended call
<wc-image-compare> with two images. Both are visible without JS.
Also in
CSS, Bricks, EmDash

<wc-marquee>

Pattern
marquee
Ships in
elements.js
With no JS
full
What JS adds
fills the track with enough copies to scroll seamlessly
Recommended call
<Marquee> around one .marquee__content, or <wc-marquee> by hand. Scrolls via CSS alone; JS only removes the seam.
Also in
CSS, Astro, EmDash

<wc-multifield>

Pattern
multi-field
Ships in
elements.js
With no JS
full
What JS adds
Add, Remove and Clear for a repeated field or fieldset, with min, max and protect-defaults; a row of a keyed map is an open <details> titled by its key
Recommended call
<wc-multifield name type placeholder min max protect-defaults> around the field(s) to repeat (each child is an entry), or around .field__row <details> fieldsets (what renderProjectionHtml writes for a keyed map: the last row blank, so with no JS filling it in adds an entry and emptying a row's key drops it). Light DOM: every control is native and submits with the form. Events multi-field-change|add|delete|clear.
Also in
CSS, Bricks

<wc-notifications>

Pattern
notification
Ships in
elements.js
With no JS
full
What JS adds
the one labelled, top-layer region a page's notifications stack in: show() and a vitops:notify event, persistent unless duration is set, a countdown that pauses on hover and focus, announced through ariaNotify() or the shared live region, held back while a modal dialog is open, focus handed to a neighbour on close
Recommended call
<Notifications /> once per layout, in the same place on every page; it emits its own <wc-notifications>, so do NOT wrap it. Show one with element.show({ message, title?, tone?, duration?, actions? }) or document.dispatchEvent(new CustomEvent("vitops:notify", { detail })). A server-rendered <div class="notification" role="status"> inside it is the no-JS fallback and is adopted into the stack on upgrade. tone is info, success, warning or danger. For something the visitor must act on use a banner or a dialog, not this; for one message that closes itself without a stack use .notification in <wc-dismissable>.
Also in
CSS, Astro

<wc-oklch-color-picker>

Pattern
oklch-color-picker
Ships in
no bundle — inert
With no JS
none
What JS adds
OKLCH L/C/H picker
Recommended call
Not used directly: <wc-color-field> imports it when its picker is first opened. It is a canvas control with no meaning without JS.
Also in
this tier only

<wc-range>

Pattern
range
Ships in
elements.js
With no JS
full
What JS adds
overlays two native range inputs on one track with thumbs that cannot cross and a filled span between them, and keeps an <output> current
Recommended call
A single slider needs no element: a bare <input type="range"> is themed by forms.css (accent-color). For its value shown, or for two thumbs, use <Range name label min max value output /> or <Range names labels values />: with no JS those are native range inputs (two submit as two fields). Every input needs a label. Do NOT wrap it in <wc-range>: it emits its own.
Also in
CSS, Astro

<wc-split-panel>

Pattern
split-panel
Ships in
elements.js
With no JS
partial
What JS adds
draggable divider between two panels
Recommended call
<wc-split-panel> with two children. Unenhanced they simply stack.
Also in
CSS, Bricks

<wc-stepper>

Pattern
stepper
Ships in
@getvitops/core/stepper
With no JS
full
What JS adds
shows one section of a long form at a time with Back and Next, stops a forward move at the first invalid step, marks the current link aria-current="step", and follows the URL fragment
Recommended call
<Stepper steps> around one <form> of <section id data-step><h2>…</h2>…</section>s: with no JS a complete long form with #anchor links, with JS one step at a time. <StepperNav steps current status hrefFor> is the same .stepper list for a flow where each step is its own page (no JS at all). Do NOT wrap <Stepper> in <wc-stepper>: it emits its own. Its own Lit-free bundle (@getvitops/core/stepper, ~1 KB gzipped), outside elements.js.
Also in
CSS, Astro

<wc-tabs>

Pattern
tabs
Ships in
elements.js
With no JS
full
What JS adds
a WAI-ARIA tablist (arrow/Home/End keys, automatic activation, roving tabindex) built from the headings, one panel shown at a time, URL-fragment deep links
Recommended call
<Tabs items={[{ label, body }]} />, or <Tabs> around your own <section><h3>…</h3>…</section> panels. With no JS every panel is readable under its heading. orientation="vertical" runs the list down the side; hash writes the selected panel into the URL; selected sets the first tab. Do NOT wrap it in <wc-tabs>: it emits its own. By hand: <wc-tabs class="tabs"> around <section>s that each open with a heading.
Also in
CSS, Astro, EmDash

<wc-theme-editor>

Pattern
theme-editor
Ships in
@getvitops/core/editor
With no JS
none
What JS adds
live :root token overrides, export as CSS or a config patch
Recommended call
<wc-theme-editor manifest="…">. TOOLING, not a page pattern — the one deliberate tier-2 exception, quarantined in its own opt-in bundle.
Also in
CSS

<wc-tree>

Pattern
tree
Ships in
elements.js
With no JS
partial
What JS adds
WAI-ARIA tree semantics, roving-tabindex keyboard navigation, filter, expand/collapse all, hash deep-linking
Recommended call
<Tree items={…} /> — it emits <wc-tree> itself, so do NOT add your own wrapper. In EmDash, vitops_tree takes an indented outline (one node per line, indent to nest, | badge for a chip) and builds the tree from it; it never sets descriptionHtml.
Also in
CSS, Astro, EmDash

<wc-turnstile>

Pattern
turnstile
Ships in
elements.js
With no JS
partial
What JS adds
loads Cloudflare Turnstile on first interaction with the form and holds a submit until its token arrives
Recommended call
<wc-turnstile sitekey="…"> inside a <form>, around a paragraph saying the spam check needs JavaScript. Pair it with createConversionRoute({ turnstile }); the vitops_form block does both.
Also in
CSS, EmDash

Live, interactive demos of each are on thePatterns page.

Built with the design system it documents.

@getvitops on npm