Astro components
Tier 3 — authoring conveniences that emit the correct markup at build time: which wrap a web component, and which emit plain tier-1 markup.
Tier 3 is authoring convenience. Each component renders the correct markup and classes so you don't hand-write boilerplate, and none of them requires runtime JavaScript — Subgrid emits a subgrid list, Popover uses the native Popover API with Anchor Positioning, Details/Drawer/NavShellcompose <details> with Invoker Commands. If a wrapper would need runtime JS it is the wrong tier: that becomes a web component, and the wrapper emits its tag instead.
Tier 3 has two platforms and these are one of them — theBricks elements are the other, at the same tier rather than above it. Both generate HTML from the classes and elements of tiers 1 and 2; which you use is decided by your platform, and no project uses both.
Read the "emits" column before you write markup
Where a component wraps a web component, it emits that tag with the accessible fallback inside it — so the one call is the whole composition, and adding your own wrapper nests two elements on one tree:
<!-- wrong -->
<wc-tree><Tree items={…} /></wc-tree>
<!-- right -->
<Tree items={…} /><Breadcrumbs />
- Pattern
breadcrumbs- Import
@getvitops/astro/components/Breadcrumbs.astro- Emits
- tier-1 markup — no web component
- Recommended call
<Breadcrumbs items={[{ label, href }, …, { label }]} />. The last item is the current page (aria-current, never a link). Emits theBreadcrumbListJSON-LD from the same items unlessschema={false}. Hand-written:<nav aria-label="Breadcrumb" class="breadcrumbs"><ol><li>…. No JS.- Also in
- CSS
<Cards />
- Pattern
card- Import
@getvitops/astro/components/Cards.astro- Emits
- the
<wc-cards>tag, fallback inside - 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, Web component, EmDash
<Carousel />
- Pattern
carousel- Import
@getvitops/astro/components/Carousel.astro- Emits
- the
<wc-carousel>tag, fallback inside - Recommended call
<Carousel slides={…} label="…" />— it emits<wc-carousel>itself, so do NOT add your own wrapper..carouselis the shell and.carousel__trackthe scroller; addloopfor the cloned infinite strip (autoplayimplies it).- Also in
- CSS, Web component, Bricks, EmDash
<Combobox />
- Pattern
combobox- Import
@getvitops/astro/components/Combobox.astro- Emits
- the
<wc-combobox>tag, fallback inside - 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, Web component
<ConfigForm />
- Pattern
config-form- Import
@getvitops/astro/components/ConfigForm.astro- Emits
- the
<wc-config-form>tag, fallback inside - Recommended call
<ConfigForm id schema paths output><form method="post">…</form></ConfigForm>, with the fields fromrenderStepHtml/renderProjectionHtml(@getvitops/utils/forms). With no JS it is a plain form posting the namesformToConfigparses 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.pathsnarrows the schema to the fields shown;novalidatelets the server decide a submit.- Also in
- Web component
<ConfigPreview />
- Pattern
config-preview- Import
@getvitops/astro/components/ConfigPreview.astro- Emits
- the
<wc-config-preview>tag, fallback inside - 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
- Web component
<CookieConsent />
- Pattern
consent- Import
@getvitops/astro/CookieConsent.astro- Emits
- the
<wc-consent>tag, fallback inside - Recommended call
<CookieConsent />. Its own Lit-free bundle so a site needing consent does not download a rendering framework.- Also in
- CSS, Web component
<ContrastToggle />
- Pattern
contrast-toggle- Import
@getvitops/astro/components/ContrastToggle.astro- Emits
- the
<wc-contrast-toggle>tag, fallback inside - Recommended call
<ContrastToggle />— it emits<wc-contrast-toggle>itself, so do NOT add your own wrapper. Setsite.accessibility.contrastToggle: trueso 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, Web component
<Counter />
- Pattern
counter- Import
@getvitops/astro/components/Counter.astro- Emits
- the
<wc-counter>tag, fallback inside - 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, Web component, EmDash
<Details />
- Pattern
details- Import
@getvitops/astro/components/Details.astro- Emits
- tier-1 markup — no web component
- Recommended call
<Details>— or hand-write<details>. No JS at either tier;::details-contentanimates in CSS.- Also in
- CSS, EmDash
<Drawer />
- Pattern
drawer- Import
@getvitops/astro/components/Drawer.astro- Emits
- tier-1 markup — no web component
- Recommended call
<Drawer>—<dialog class="drawer">plus an Invoker Commands trigger. No JS.- Also in
- CSS
<Entries />
- Pattern
entries- Import
@getvitops/astro/components/Entries.astro- Emits
- the
<wc-entries>tag, fallback inside - 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, Web component, Bricks, EmDash
<Field />
- Pattern
field- Import
@getvitops/astro/components/Field.astro- Emits
- the
<wc-field>tag, fallback inside - Recommended call
<Field label help error optional><input name … /></Field>: the label nests the control, so noid/foris needed. With no JS it is a labelled control and a servererroris 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-groupfor a field whose label and control are siblings.- Also in
- CSS, Web component
<Format />
- Pattern
format- Import
@getvitops/astro/components/Format.astro- Emits
- the
<wc-format>tag, fallback inside - Recommended call
<Format type="relative" value="2026-11-03T14:05:00Z">November 3, 2026</Format>: the slot is the no-JS text, andtitlekeeps it after upgrade.typeisrelative,date,datetime,time,number,percentorcurrency(needscurrency="CAD").fields="year"shows only those date parts andnowformats the current date instead ofvalue(<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
- Web component
<ContactForm />
- Pattern
forms- Import
@getvitops/astro/components/ContactForm.astro- Emits
- tier-1 markup — no web component
- Recommended call
- Wrap text controls in
.form-groupor.input-group— a bare<input>gets browser defaults. For a contact or enquiry form use<ContactForm />(name, email, phone, message, orfields={[{ label, type, required }]}): a real<form method="post">tocreateConversionRoute()with the honeypot and, whensite.security.turnstile.siteKeyis set, Turnstile. Do not hand-write that form: the route drops a field namedphone(it is the tel-click payload) and treatswebsite/honeypotas bot traps, and<ContactForm>submits a phone astel. In EmDash,vitops_formis the same form with editor-defined fields. - Also in
- CSS, EmDash
<Gallery />
- Pattern
gallery- Import
@getvitops/astro/components/Gallery.astro- Emits
- the
<wc-gallery>tag, fallback inside - 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">(seelightbox), 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, Web component, EmDash
<Icon />
- Pattern
icon- Import
@getvitops/astro/components/Icon.astro- Emits
- tier-1 markup — no web component
- Recommended call
<Icon name="menu" />. Names are semantic and resolve per configured set; a name containing:passes through.- Also in
- CSS, Bricks
<LocationPage />
- Pattern
location-pages- Import
@getvitops/astro/components/LocationPage.astro- Emits
- tier-1 markup — no web component
- Recommended call
<LocationPage location={…} defaultLocale>and<ServicePage service={…} defaultLocale providerName>: oneorganization.locations/organization.servicesentry as a page (name, address, hours table, photos, offers) plus itsLocalBusiness/ServiceJSON-LD, with a slot for your own copy. In EmDash,vitops_locationplaces one location in content (a build-time import oforganization.locations,virtual:getvitops/organization, served byvitops()). Nothing scaffolds the route: writesrc/pages/locations/[slug].astrowithgetStaticPaths()over the record andresolveSlug()from@getvitops/astro/schemas/graph-adapters.ts(the idiom is in LocationPage's docblock). The key of the record, not theslug, is the entry's identity.- Also in
- EmDash
<ServicePage />
- Pattern
location-pages- Import
@getvitops/astro/components/ServicePage.astro- Emits
- tier-1 markup — no web component
- Recommended call
<LocationPage location={…} defaultLocale>and<ServicePage service={…} defaultLocale providerName>: oneorganization.locations/organization.servicesentry as a page (name, address, hours table, photos, offers) plus itsLocalBusiness/ServiceJSON-LD, with a slot for your own copy. In EmDash,vitops_locationplaces one location in content (a build-time import oforganization.locations,virtual:getvitops/organization, served byvitops()). Nothing scaffolds the route: writesrc/pages/locations/[slug].astrowithgetStaticPaths()over the record andresolveSlug()from@getvitops/astro/schemas/graph-adapters.ts(the idiom is in LocationPage's docblock). The key of the record, not theslug, is the entry's identity.- Also in
- EmDash
<Marquee />
- Pattern
marquee- Import
@getvitops/astro/components/Marquee.astro- Emits
- the
<wc-marquee>tag, fallback inside - Recommended call
<Marquee>around one.marquee__content, or<wc-marquee>by hand. Scrolls via CSS alone; JS only removes the seam.- Also in
- CSS, Web component, EmDash
<Masthead />
- Pattern
masthead- Import
@getvitops/astro/components/Masthead.astro- Emits
- tier-1 markup — no web component
- Recommended call
<Masthead config={site}>fromsite.chrome.masthead(positionstatic|sticky|fixed, surfacesolid|glass|transparent, layoutfull|inset|floating,insetandheightlengths — fluid ones likeclamp(3.5rem, 8cqi, 4.5rem)are fine — elevation shadow/border, andstates: a partial look per scroll state —atStart,atEnd,scrollingToEnd,scrollingToStart, later wins, animated — takinglayout,height,inset,surface,elevation(orfalse) andhidden; e.g. a full-width banner at the top that floats once scrolled, a bar hidden until first scroll, hide-on-scroll). A prop overrides one field for a layout. A state that hides the bar at the start, or changes its size or layout, makes itfixed. Slotsbrand(default:organization.logolinked tobrandHref,logo={false}to omit), default (the<SiteNav>),actions. Pure CSS: states arescroll-state()queries that only override a settled bar, so a browser without them (Firefox today) shows a visible, solid, elevated one. It never takesrole="banner": a body-level<header>already is the landmark, and.bannermeans the announcement bar.- Also in
- CSS
<NavShell />
- Pattern
navshell- Import
@getvitops/astro/components/NavShell.astro- Emits
- tier-1 markup — no web component
- Recommended call
<NavShell>with anavslot, plus<NavShellToggle>if the toggle must live outside the shell.- Also in
- CSS
<NavShellToggle />
- Pattern
navshell- Import
@getvitops/astro/components/NavShellToggle.astro- Emits
- tier-1 markup — no web component
- Recommended call
<NavShell>with anavslot, plus<NavShellToggle>if the toggle must live outside the shell.- Also in
- CSS
<Notifications />
- Pattern
notification- Import
@getvitops/astro/components/Notifications.astro- Emits
- the
<wc-notifications>tag, fallback inside - 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 withelement.show({ message, title?, tone?, duration?, actions? })ordocument.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.toneisinfo,success,warningordanger. 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.notificationin<wc-dismissable>.- Also in
- CSS, Web component
<Popover />
- Pattern
popover- Import
@getvitops/astro/components/Popover.astro- Emits
- tier-1 markup — no web component
- Recommended call
<Popover>— native Popover API + CSS Anchor Positioning. No JS.- Also in
- CSS
<Range />
- Pattern
range- Import
@getvitops/astro/components/Range.astro- Emits
- the
<wc-range>tag, fallback inside - Recommended call
- A single slider needs no element: a bare
<input type="range">is themed byforms.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, Web component
<ReviewCard />
- Pattern
review- Import
@getvitops/astro/components/ReviewCard.astro- Emits
- tier-1 markup — no web component
- Recommended call
<ReviewCard review={…} />— one card, fromvitops reviews'.vitops/reviews.jsoncache. Put several inside<Carousel>slides or<Marquee>items; there is no group component and nowc-review. In EmDash,vitops_reviewsis that whole row: it reads the cache as a build-time import (virtual:getvitops/reviews, served byvitops(); empty when the file is absent), picks reviews withselectReviews(), and lays them out as a grid, carousel or marquee. A new review appears aftervitops reviewsis re-run, committed and the site rebuilt.- Also in
- CSS, EmDash
<BackToTop />
- Pattern
scroll-button- Import
@getvitops/astro/components/BackToTop.astro- Emits
- tier-1 markup — no web component
- Recommended call
<BackToTop />(orsite.chrome.backToTop, rendered by<SiteFooter config>) for a floating link that shows once the page has scrolled;<ScrollCue />as the LAST child of aposition: relativehero, a chevron to the end of that section that hides once scrolling starts. Plain<a href="#…">; hiding is ascroll-state()query, so a browser without it (Firefox today) shows both always. The hero block has ascrollCuetoggle.- Also in
- CSS
<ScrollCue />
- Pattern
scroll-button- Import
@getvitops/astro/components/ScrollCue.astro- Emits
- tier-1 markup — no web component
- Recommended call
<BackToTop />(orsite.chrome.backToTop, rendered by<SiteFooter config>) for a floating link that shows once the page has scrolled;<ScrollCue />as the LAST child of aposition: relativehero, a chevron to the end of that section that hides once scrolling starts. Plain<a href="#…">; hiding is ascroll-state()query, so a browser without it (Firefox today) shows both always. The hero block has ascrollCuetoggle.- Also in
- CSS
<ScrollEdges />
- Pattern
scroll-edges- Import
@getvitops/astro/components/ScrollEdges.astro- Emits
- tier-1 markup — no web component
- Recommended call
<ScrollEdges>(or.scroll-edgeswith the twoaria-hidden.scroll-edges__start/__endchildren by hand) for a horizontally scrolling strip that fades at an edge while there is more that way. The scroll-state vocabulary is the masthead's (at-start,at-end) on the inline axis; hooks--scroll-edges-fade,--scroll-edges-bg,--scroll-edges-<state>-fade-opacity.scroll-state()cannot style the scroller itself, so the fades are sticky child elements. Without it (Firefox today) both fades stay on. Give a strip with nothing focusable in itfocusable+ alabel.- Also in
- CSS
<Toc />
- Pattern
scroll-target- Import
@getvitops/astro/components/Toc.astro- Emits
- tier-1 markup — no web component
- Recommended call
<Toc headings={headings} />(Astro'sMarkdownHeading[]) or.scroll-target-groupby hand. The current section is:target-currentwherescroll-target-groupexists (Chromium); elsewherepolyfills.jsloads an IntersectionObserver that sets.is-current+aria-current="location".- Also in
- CSS
<SiteNav />
- Pattern
sitenav- Import
@getvitops/astro/components/SiteNav.astro- Emits
- tier-1 markup — no web component
- Recommended call
.sitenavwith--bp-*and a drawer direction.<details>+ Invoker Commands, no JS. In Astro:<SiteNav {...await loadNavMenus(getMenu)} />renders EmDash menuprimary(the default: dropdowns frommd, drawer below) and, if they exist,primary-mobile(depth-1 nav belowmd) andprimary-mega(mega panels fromxl) — adding the menu in the admin is the whole change. An item'stitleAttris its description. Per-site behaviour lives insite.chrome.nav—<SiteNav {...nav} {...resolveNavOptions(site)} />setscompact(drawer|dropdown: an anchored, columnar panel under the toggle),drawerSide, the breakpoints and depths. For a mega panel's featured column passmegaPanel={VitopsMegaPanel}(@getvitops/emdash/astro): it renders the widget areamega-<item slug>(or the item'smega-area:<name>class) and nothing when there is none.<SiteFooter sitemap legal name config={site}>rendersfooter-sitemap+footer-legal+ the copyright line, plusorganization.logoand a contact column (address, tel:/mailto: links, one location's hours, profile links) from the same config: nothing to hand-write,contact={false}/logo={false}to omit, abrandslot to replace the logo,locationto pick whose hours. For a menu inside page content (a site map, a section's links, footer-style columns) use.navlist— plain nested lists,--inline/--columns— or, in EmDash, thevitops_navblock (menu, layoutlist|inline|columns|sitenav, depth 1–3, heading, tone). Name each<nav>uniquely: the header isPrimaryand the footerSite map/Legal, and the block never reuses those.- Also in
- CSS, Bricks, EmDash
<SiteFooter />
- Pattern
sitenav- Import
@getvitops/astro/components/SiteFooter.astro- Emits
- tier-1 markup — no web component
- Recommended call
.sitenavwith--bp-*and a drawer direction.<details>+ Invoker Commands, no JS. In Astro:<SiteNav {...await loadNavMenus(getMenu)} />renders EmDash menuprimary(the default: dropdowns frommd, drawer below) and, if they exist,primary-mobile(depth-1 nav belowmd) andprimary-mega(mega panels fromxl) — adding the menu in the admin is the whole change. An item'stitleAttris its description. Per-site behaviour lives insite.chrome.nav—<SiteNav {...nav} {...resolveNavOptions(site)} />setscompact(drawer|dropdown: an anchored, columnar panel under the toggle),drawerSide, the breakpoints and depths. For a mega panel's featured column passmegaPanel={VitopsMegaPanel}(@getvitops/emdash/astro): it renders the widget areamega-<item slug>(or the item'smega-area:<name>class) and nothing when there is none.<SiteFooter sitemap legal name config={site}>rendersfooter-sitemap+footer-legal+ the copyright line, plusorganization.logoand a contact column (address, tel:/mailto: links, one location's hours, profile links) from the same config: nothing to hand-write,contact={false}/logo={false}to omit, abrandslot to replace the logo,locationto pick whose hours. For a menu inside page content (a site map, a section's links, footer-style columns) use.navlist— plain nested lists,--inline/--columns— or, in EmDash, thevitops_navblock (menu, layoutlist|inline|columns|sitenav, depth 1–3, heading, tone). Name each<nav>uniquely: the header isPrimaryand the footerSite map/Legal, and the block never reuses those.- Also in
- CSS, Bricks, EmDash
<Stepper />
- Pattern
stepper- Import
@getvitops/astro/components/Stepper.astro- Emits
- the
<wc-stepper>tag, fallback inside - Recommended call
<Stepper steps>around one<form>of<section id data-step><h2>…</h2>…</section>s: with no JS a complete long form with#anchorlinks, with JS one step at a time.<StepperNav steps current status hrefFor>is the same.stepperlist 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), outsideelements.js.- Also in
- CSS, Web component
<StepperNav />
- Pattern
stepper- Import
@getvitops/astro/components/StepperNav.astro- Emits
- tier-1 markup — no web component
- Recommended call
<Stepper steps>around one<form>of<section id data-step><h2>…</h2>…</section>s: with no JS a complete long form with#anchorlinks, with JS one step at a time.<StepperNav steps current status hrefFor>is the same.stepperlist 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), outsideelements.js.- Also in
- CSS, Web component
<Subgrid />
- Pattern
subgrid- Import
@getvitops/astro/components/Subgrid.astro- Emits
- tier-1 markup — no web component
- Recommended call
<Subgrid>— emits<ul class="subgrid" role="list">; author<li class="card subgrid-card">items yourself, so tranches align across the set.- Also in
- CSS, EmDash
<Tabs />
- Pattern
tabs- Import
@getvitops/astro/components/Tabs.astro- Emits
- the
<wc-tabs>tag, fallback inside - 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;hashwrites the selected panel into the URL;selectedsets 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, Web component, EmDash
<Tooltip />
- Pattern
tooltip- Import
@getvitops/astro/components/Tooltip.astro- Emits
- tier-1 markup — no web component
- Recommended call
<Tooltip id label>text</Tooltip>for what a control does,<Tooltip toggle>for a "?" that reveals more than a phrase (touch and screen readers). Not an element: the markup is.tooltip-trigger+ a.tooltippopover, linked bypopovertarget(the no-JS click toggle), anddeferred.jsadds hover, keyboard focus and Escape, a per-pair anchor,role="tooltip", andaria-describedby(plain) oraria-expanded(toggletip).- Also in
- CSS
<Tree />
- Pattern
tree- Import
@getvitops/astro/components/Tree.astro- Emits
- the
<wc-tree>tag, fallback inside - Recommended call
<Tree items={…} />— it emits<wc-tree>itself, so do NOT add your own wrapper. In EmDash,vitops_treetakes an indented outline (one node per line, indent to nest,| badgefor a chip) and builds the tree from it; it never setsdescriptionHtml.- Also in
- CSS, Web component, EmDash
Installing and configuring the integration is covered inInstallation; the package's full surface is on @getvitops/astro.