Forms
Two field systems, because two jobs. The boxed .av-field is for data
entry — settings, product editors, checkout. The underline
.av-field-line is for the short, high-ceremony forms on the auth screens.
Both build on native inputs and native constraint validation; nothing here reimplements
a control the browser already ships.
Boxed fields
Label, control, then hint or error. The hint is wired with
aria-describedby rather than sitting loose beside the input — a hint a
screen reader never reaches is decoration.
Gate codes, a safe place to leave the parcel, anything the driver needs.
<div class="av-field">
<label class="av-field__label" for="ui-name">
Full name <span class="av-field__required" aria-hidden="true">*</span>
</label>
<input class="av-input" id="ui-name" name="name" required autocomplete="name">
</div>
<div class="av-field">
<label class="av-field__label" for="ui-country">Country</label>
<select class="av-select" id="ui-country" name="country">
<option>Ireland</option>
<option>United Kingdom</option>
<option>Germany</option>
<option>Spain</option>
</select>
</div>
<div class="av-field">
<label class="av-field__label" for="ui-notes">Delivery notes</label>
<textarea class="av-textarea" id="ui-notes" name="notes" rows="3"
aria-describedby="ui-notes-hint"></textarea>
<p class="av-field__hint" id="ui-notes-hint">
Gate codes, a safe place to leave the parcel, anything the driver needs.
</p>
</div>
Type to add a tag that is not in the list. Five at most.
<div class="av-field">
<label class="av-field__label" for="ui-ts-city">City</label>
<select class="av-select" id="ui-ts-city" name="city"
data-av-select data-av-select-placeholder="Search for a city…">
<option value=""></option>
<option value="dub">Dublin</option>
<option value="cor">Cork</option>
<option value="gal">Galway</option>
<option value="lim">Limerick</option>
<option value="wat">Waterford</option>
</select>
</div>
<div class="av-field">
<label class="av-field__label" for="ui-ts-tags">Tags</label>
<select class="av-select" id="ui-ts-tags" name="tags[]" multiple
data-av-select data-av-select-create="true" data-av-select-max-items="5"
aria-describedby="ui-ts-tags-hint">
<option value="urgent" selected>Urgent</option>
<option value="billing">Billing</option>
<option value="refund">Refund</option>
<option value="vip">VIP</option>
</select>
<p class="av-field__hint" id="ui-ts-tags-hint">
Type to add a tag that is not in the list. Five at most.
</p>
</div>
Amex regroups itself to 4-6-5; everything else is 4-4-4-4.
<div class="av-field">
<label class="av-field__label" for="ui-mask-card">Card number</label>
<input class="av-input" id="ui-mask-card" inputmode="numeric" autocomplete="cc-number"
data-av-mask data-av-mask-type="card"
aria-describedby="ui-mask-card-hint">
<p class="av-field__hint" id="ui-mask-card-hint">
Amex regroups itself to 4-6-5; everything else is 4-4-4-4.
</p>
</div>
<div class="av-field-row">
<div class="av-field">
<label class="av-field__label" for="ui-mask-amount">Amount</label>
<input class="av-input" id="ui-mask-amount" inputmode="decimal"
data-av-mask data-av-mask-type="currency" data-av-mask-currency="EUR">
</div>
<div class="av-field">
<label class="av-field__label" for="ui-mask-phone">Phone</label>
<input class="av-input" id="ui-mask-phone" type="tel" inputmode="tel"
autocomplete="tel"
data-av-mask data-av-mask-pattern="+000 00 000 0000">
</div>
</div>
<div class="av-field">
<label class="av-field__label" for="ui-mask-iban">IBAN</label>
<input class="av-input" id="ui-mask-iban"
data-av-mask data-av-mask-pattern="aa00 0000 0000 0000 0000 00"
data-av-mask-uppercase="true">
</div>
PDF, Word or images. Up to five files, 10 MB each. The `accept` attribute is the single source of the type rule — the native picker filters by it and the plugin rejects a drop that goes around it.
<div class="av-field">
<label class="av-field__label" for="ui-upload">Documents</label>
<input type="file" class="av-input" id="ui-upload" name="documents[]" multiple
accept=".pdf,.docx,image/*"
data-av-uploader
data-av-uploader-max-files="5"
data-av-uploader-max-size="10MB"
aria-describedby="ui-upload-hint">
<p class="av-field__hint" id="ui-upload-hint">
PDF, Word or images. Up to five files, 10 MB each. The `accept` attribute is the
single source of the type rule — the native picker filters by it and the plugin
rejects a drop that goes around it.
</p>
</div>
0 / 600 characters
<div class="av-field">
<label class="av-field__label" for="ui-descr">Product description</label>
<div class="av-editor"
data-av-editor
data-av-editor-toolbar="standard"
data-av-editor-placeholder="Describe the product…"
data-av-editor-input="#ui-descr"
data-av-editor-max-length="600"
style="--av-editor-min-height: 200px"></div>
<textarea class="av-textarea" id="ui-descr" name="description" rows="6"
aria-describedby="ui-descr-count"><p>Water-resistant 24L daypack with a padded 14" mechanical keyboard, a roll-top closure and a hidden rear pocket.</p></textarea>
<p class="av-field__hint" id="ui-descr-count">
<span class="av-counter" data-av-editor-count>0</span> / 600 characters
</p>
</div>
<div class="av-field">
<label class="av-field__label" for="ui-webhook">Webhook payload</label>
<div class="av-code-editor"
data-av-code-editor
data-av-code-editor-language="json"
data-av-code-editor-input="#ui-webhook"
data-av-code-editor-status="#ui-webhook-status"
style="--av-editor-min-height: 200px"></div>
<textarea class="av-input av-code-editor__source" id="ui-webhook" name="payload" rows="8"
aria-describedby="ui-webhook-status">{
"event": "order.paid",
"retries": 3,
"active": true,
"target": "https://hooks.example.com/orders",
"fields": ["id", "total", "currency"]
}</textarea>
<p class="av-code-editor__footer">
<span class="av-code-editor__lang">json</span>
<span class="av-code-editor__status" id="ui-webhook-status" role="status"></span>
</p>
</div>
<div class="av-field">
<label class="av-field__label" for="ui-plan">Plan</label>
<input class="av-input" id="ui-plan" value="Business — annual" readonly>
</div>
<div class="av-field">
<label class="av-field__label" for="ui-vat">VAT number</label>
<input class="av-input" id="ui-vat" value="IE 4820113W" disabled>
</div>
15 / 60 — search engines cut the rest.
<div class="av-field">
<label class="av-field__label" for="ui-title">Page title</label>
<input class="av-input" id="ui-title" maxlength="60" value="Canvas backpack"
data-av-counter data-av-counter-target="#ui-title-count"
aria-describedby="ui-title-count">
<p class="av-field__hint">
<span class="av-counter" id="ui-title-count">15 / 60</span> — search engines cut the
rest.
</p>
</div>
Input groups
A prefix or suffix that is part of the value's meaning rather than part of the label — a currency symbol, a unit, a fixed URL stem.
<div class="av-field">
<label class="av-field__label" for="ui-price">Price</label>
<div class="av-input-group">
<span class="av-input-group__text">€</span>
<input class="av-input" id="ui-price" inputmode="decimal" value="89.00">
</div>
</div>
<div class="av-field">
<label class="av-field__label" for="ui-weight">Weight</label>
<div class="av-input-group">
<input class="av-input" id="ui-weight" inputmode="decimal" value="0.9">
<span class="av-input-group__text">kg</span>
</div>
</div>
<div class="av-field">
<label class="av-field__label" for="ui-handle">URL handle</label>
<div class="av-input-group">
<span class="av-input-group__text">acme.ie/products/</span>
<input class="av-input" id="ui-handle" value="canvas-backpack" autocomplete="off">
</div>
</div>
Underline fields
The auth-screen style. Lighter chrome, an optional trailing icon, and a password
toggle that swaps the input's type rather than rendering the characters
itself.
<div class="av-field-line">
<label class="av-field-line__label" for="ui-email">Email address</label>
<div class="av-field-line__control">
<input class="av-field-line__input" type="email" id="ui-email"
placeholder="you@company.com" autocomplete="email">
<span class="av-field-line__icon">
<svg class="av-icon" aria-hidden="true" viewBox="0 0 24 24"><rect x="3" y="5" width="18" height="14" rx="2"/><path d="M3 7l9 6 9-6"/></svg>
</span>
</div>
</div>
<div class="av-field-line">
<label class="av-field-line__label" for="ui-password">Password</label>
<div class="av-field-line__control">
<input class="av-field-line__input" type="password" id="ui-password"
autocomplete="current-password" value="correct horse battery">
<button class="av-field-line__toggle" type="button"
data-av-password-toggle="#ui-password"
aria-label="Show password" aria-pressed="false">
<svg class="av-icon av-icon--on" aria-hidden="true" viewBox="0 0 24 24"><path d="M2 12s3.5-6 10-6 10 6 10 6-3.5 6-10 6S2 12 2 12z"/><circle cx="12" cy="12" r="3"/></svg>
<svg class="av-icon av-icon--off" aria-hidden="true" viewBox="0 0 24 24"><path d="M2 12s3.5-6 10-6 10 6 10 6-3.5 6-10 6S2 12 2 12z"/><circle cx="12" cy="12" r="3"/><path d="M4 4l16 16"/></svg>
</button>
</div>
</div>
That reference does not exist.
<div class="av-field-line is-invalid">
<label class="av-field-line__label" for="ui-ref">Invoice reference</label>
<div class="av-field-line__control">
<input class="av-field-line__input" type="text" id="ui-ref" value="INV-000"
aria-invalid="true" aria-describedby="ui-ref-error">
</div>
<p class="av-field-line__error" id="ui-ref-error" role="alert">
That reference does not exist.
</p>
</div>
Toggles and selection
All native inputs underneath. A switch is a checkbox that looks like a switch, which means keyboard, form submission and the browser's own autofill all keep working.
<label class="av-switch"><input type="checkbox" checked name="option"> Email digest</label>
<label class="av-switch"><input type="checkbox" name="option"> Weekly summary</label>
<label class="av-form-check"><input class="av-check" type="checkbox" checked name="option"> Remember me</label>
<label class="av-form-check"><input class="av-check" type="checkbox" name="option"> Send a copy</label>
<div class="av-segmented" role="radiogroup" aria-label="Date range">
<label><input type="radio" name="ui-range" value="7" checked>7 days</label>
<label><input type="radio" name="ui-range" value="30">30 days</label>
<label><input type="radio" name="ui-range" value="90">90 days</label>
</div>
Choice cards
For a decision with consequences worth spelling out — a delivery method, a plan, a payment type. The whole card is the label, so the hit area is the card and there is still exactly one tab stop per option.
<div class="av-choice-group">
<label class="av-choice">
<input class="av-check av-choice__input" type="radio" name="ui-delivery" value="standard" checked>
<span class="av-choice__body">
<span class="av-choice__title">Standard — An Post</span>
<span class="av-choice__text">3 to 5 working days, tracked</span>
</span>
<span class="av-choice__meta">€9.00</span>
</label>
<label class="av-choice">
<input class="av-check av-choice__input" type="radio" name="ui-delivery" value="express">
<span class="av-choice__body">
<span class="av-choice__title">Express — DPD</span>
<span class="av-choice__text">Next working day if ordered before 15:00</span>
</span>
<span class="av-choice__meta">€16.50</span>
</label>
<label class="av-choice">
<input class="av-check av-choice__input" type="radio" name="ui-delivery" value="collect">
<span class="av-choice__body">
<span class="av-choice__title">Collect in store</span>
<span class="av-choice__text">Ready within two hours, Dublin 2</span>
</span>
<span class="av-choice__meta">Free</span>
</label>
</div>
Validation
data-av-validate on a novalidate form takes over the
browser's own constraint checking and reports it in place. The timing is the part that
matters: a field is checked on blur, then re-checked on every keystroke
only once it is already invalid. Validating on input from the start lights up
every required field the moment somebody tabs through the form.
<form novalidate data-av-validate style="max-inline-size: 34rem">
<div class="av-alert av-alert--danger-soft av-form-errors" role="alert" tabindex="-1"
data-av-form-errors hidden>
<svg class="av-icon av-alert__icon" aria-hidden="true" viewBox="0 0 24 24"><circle cx="12" cy="12" r="9"/><path d="M12 7.5v5.5M12 16.2v.3"/></svg>
<div class="av-alert__body">
<h3 class="av-alert__title" data-av-form-errors-title>There are problems with this form</h3>
<ul></ul>
</div>
</div>
<div class="av-field">
<label class="av-field__label" for="ui-v-email">
Work email <span class="av-field__required" aria-hidden="true">*</span>
</label>
<input class="av-input" type="email" id="ui-v-email" name="email" required
autocomplete="email" aria-describedby="ui-v-email-error">
<p class="av-field__error" id="ui-v-email-error"></p>
</div>
<div class="av-field">
<label class="av-field__label" for="ui-v-seats">
Seats <span class="av-field__required" aria-hidden="true">*</span>
</label>
<input class="av-input" type="number" id="ui-v-seats" name="seats" required
min="1" max="500" aria-describedby="ui-v-seats-hint ui-v-seats-error">
<p class="av-field__hint" id="ui-v-seats-hint">Between 1 and 500.</p>
<p class="av-field__error" id="ui-v-seats-error"></p>
</div>
<div class="av-form-actions">
<button class="av-btn av-btn--primary" type="submit" data-av-loading>Create workspace</button>
<button class="av-btn av-btn--ghost" type="reset">Reset</button>
</div>
</form>
Layout
.av-field-row puts fields side by side and collapses them on a narrow
screen. .av-fieldset groups related ones with a real
<legend>, which is what tells a screen reader that the three inputs
below belong to one question.
<fieldset class="av-fieldset" style="max-inline-size: 34rem">
<legend class="av-fieldset__legend">Billing address</legend>
<div class="av-field">
<label class="av-field__label" for="ui-street">Street</label>
<input class="av-input" id="ui-street" autocomplete="address-line1">
</div>
<div class="av-field-row">
<div class="av-field">
<label class="av-field__label" for="ui-city">City</label>
<input class="av-input" id="ui-city" autocomplete="address-level2">
</div>
<div class="av-field">
<label class="av-field__label" for="ui-post">Eircode</label>
<input class="av-input" id="ui-post" autocomplete="postal-code">
</div>
</div>
</fieldset>
Floating labels and file input
.av-float-label — named for this build, not Bootstrap's
.form-floating.
<div class="av-float-label">
<input class="av-input" type="text" id="fl-name" placeholder=" " value="Amelia Hart">
<label for="fl-name">Full name</label>
</div>
<div class="av-float-label">
<input class="av-input" type="email" id="fl-mail" placeholder=" ">
<label for="fl-mail">Email address</label>
</div>
<input class="av-input" type="file" id="fl-file" aria-label="Attach a document">
Rating and auto-grow
An interactive rating is a radio group, not a row of buttons — that is where arrow-key selection, the single tab stop and "3 of 5" announced as one control all come from.
<fieldset class="av-rating" data-av-rating>
<legend class="av-visually-hidden">Rate this product</legend>
<input type="radio" name="ui-rating" id="ui-rating-1" value="1">
<label for="ui-rating-1"><span class="av-visually-hidden">1 star</span><svg viewBox="0 0 24 24" aria-hidden="true"><path d="m12 2 3.1 6.3 6.9 1-5 4.9 1.2 6.8L12 17.8 5.8 21l1.2-6.8-5-4.9 6.9-1z"/></svg></label>
<input type="radio" name="ui-rating" id="ui-rating-2" value="2">
<label for="ui-rating-2"><span class="av-visually-hidden">2 stars</span><svg viewBox="0 0 24 24" aria-hidden="true"><path d="m12 2 3.1 6.3 6.9 1-5 4.9 1.2 6.8L12 17.8 5.8 21l1.2-6.8-5-4.9 6.9-1z"/></svg></label>
<input type="radio" name="ui-rating" id="ui-rating-3" value="3">
<label for="ui-rating-3"><span class="av-visually-hidden">3 stars</span><svg viewBox="0 0 24 24" aria-hidden="true"><path d="m12 2 3.1 6.3 6.9 1-5 4.9 1.2 6.8L12 17.8 5.8 21l1.2-6.8-5-4.9 6.9-1z"/></svg></label>
<input type="radio" name="ui-rating" id="ui-rating-4" value="4" checked>
<label for="ui-rating-4"><span class="av-visually-hidden">4 stars</span><svg viewBox="0 0 24 24" aria-hidden="true"><path d="m12 2 3.1 6.3 6.9 1-5 4.9 1.2 6.8L12 17.8 5.8 21l1.2-6.8-5-4.9 6.9-1z"/></svg></label>
<input type="radio" name="ui-rating" id="ui-rating-5" value="5">
<label for="ui-rating-5"><span class="av-visually-hidden">5 stars</span><svg viewBox="0 0 24 24" aria-hidden="true"><path d="m12 2 3.1 6.3 6.9 1-5 4.9 1.2 6.8L12 17.8 5.8 21l1.2-6.8-5-4.9 6.9-1z"/></svg></label>
</fieldset>
<div class="av-rating av-rating--sm av-rating--static" role="img"
aria-label="Average rating, 3 of 5">
<span class="av-rating__star is-on"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="m12 2 3.1 6.3 6.9 1-5 4.9 1.2 6.8L12 17.8 5.8 21l1.2-6.8-5-4.9 6.9-1z"/></svg></span>
<span class="av-rating__star is-on"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="m12 2 3.1 6.3 6.9 1-5 4.9 1.2 6.8L12 17.8 5.8 21l1.2-6.8-5-4.9 6.9-1z"/></svg></span>
<span class="av-rating__star is-on"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="m12 2 3.1 6.3 6.9 1-5 4.9 1.2 6.8L12 17.8 5.8 21l1.2-6.8-5-4.9 6.9-1z"/></svg></span>
<span class="av-rating__star"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="m12 2 3.1 6.3 6.9 1-5 4.9 1.2 6.8L12 17.8 5.8 21l1.2-6.8-5-4.9 6.9-1z"/></svg></span>
<span class="av-rating__star"><svg viewBox="0 0 24 24" aria-hidden="true"><path d="m12 2 3.1 6.3 6.9 1-5 4.9 1.2 6.8L12 17.8 5.8 21l1.2-6.8-5-4.9 6.9-1z"/></svg></span>
</div>
<textarea class="av-textarea" data-av-autosize data-av-autosize-max="220" rows="2"
aria-label="Order notes"
placeholder="Type a few lines and watch it grow…" name="autosize"></textarea>
Repeater and sortable list
Two controls for a set whose size the visitor decides.
<div class="av-repeater" data-av-repeater>
<div data-av-repeater-rows>
<div class="av-repeater__row">
<label class="av-field">
<span class="av-field__label">Option name</span>
<input class="av-input" name="options[0][name]" value="Size">
</label>
<label class="av-field">
<span class="av-field__label">Values</span>
<input class="av-input" name="options[0][values]" value="S, M, L">
</label>
<button class="av-btn av-btn--ghost av-repeater__remove" type="button"
data-av-repeater-remove>Remove</button>
</div>
</div>
<template>
<div class="av-repeater__row">
<label class="av-field">
<span class="av-field__label">Option name</span>
<input class="av-input" name="options[0][name]" value="">
</label>
<label class="av-field">
<span class="av-field__label">Values</span>
<input class="av-input" name="options[0][values]" value="">
</label>
<button class="av-btn av-btn--ghost av-repeater__remove" type="button"
data-av-repeater-remove>Remove</button>
</div>
</template>
<div>
<button class="av-btn av-btn--ghost" type="button" data-av-repeater-add>Add option</button>
</div>
</div>
- Revenue by channel
- Cohort retention
- Inventory turnover
- Support backlog
<ul class="av-sortable" data-av-sortable aria-label="Report order">
<li class="av-sortable__item"><span class="av-sortable__handle"><svg class="av-icon" aria-hidden="true" viewBox="0 0 24 24"><path d="M9 6h.01M9 12h.01M9 18h.01M15 6h.01M15 12h.01M15 18h.01"/></svg></span> Revenue by channel</li>
<li class="av-sortable__item"><span class="av-sortable__handle"><svg class="av-icon" aria-hidden="true" viewBox="0 0 24 24"><path d="M9 6h.01M9 12h.01M9 18h.01M15 6h.01M15 12h.01M15 18h.01"/></svg></span> Cohort retention</li>
<li class="av-sortable__item"><span class="av-sortable__handle"><svg class="av-icon" aria-hidden="true" viewBox="0 0 24 24"><path d="M9 6h.01M9 12h.01M9 18h.01M15 6h.01M15 12h.01M15 18h.01"/></svg></span> Inventory turnover</li>
<li class="av-sortable__item"><span class="av-sortable__handle"><svg class="av-icon" aria-hidden="true" viewBox="0 0 24 24"><path d="M9 6h.01M9 12h.01M9 18h.01M15 6h.01M15 12h.01M15 18h.01"/></svg></span> Support backlog</li>
</ul>
Date, time, colour and range
These are the platform's own controls rather than Flatpickr, noUiSlider and a colour
library. What that buys: no supply chain, no licence to audit, no bundle weight, no
vendored copy to checksum, and the native mobile pickers, which are better than
anything a library renders in a webview. What it costs: the appearance differs
between browsers, and there is no inline calendar or drag-select range.
It is reversible — the hooks are the same
data-av-* names the docs specify, so swapping a vendor in later changes
the implementation and not a page of markup.
<label class="av-field">
<span class="av-field__label">Delivery date</span>
<input class="av-input" type="date" data-av-datepicker value="2026-08-20" name="datepicker">
</label>
<label class="av-field">
<span class="av-field__label">Collection time</span>
<input class="av-input" type="time" data-av-timepicker value="09:30" name="timepicker">
</label>
<div class="av-daterange">
<input class="av-input" type="date" data-av-datepicker data-av-mode="range"
value="2026-08-01" aria-label="From date" name="datepicker">
<span class="av-daterange__sep">to</span>
<input class="av-input" type="date" value="2026-08-31" aria-label="To date" name="date">
</div>
<div class="av-color-field">
<input class="av-color" type="color" data-av-colorpicker value="#3b82f6"
aria-label="Brand colour" name="colorpicker">
<input class="av-input av-color-field__value" type="text" value="#3B82F6"
aria-label="Brand colour hex value" spellcheck="false" name="input">
</div>
<div class="av-range-field">
<input class="av-range" type="range" data-av-slider min="0" max="100" value="35"
data-av-slider-suffix="%" aria-label="Discount percentage" name="slider">
<span class="av-range-field__value">35%</span>
</div>
<div class="av-range-field">
<input class="av-range" type="range" data-av-slider min="20" max="80" value="20"
data-av-slider-suffix=" kg" aria-label="Parcel weight" name="slider">
<span class="av-range-field__value">20 kg</span>
</div>
Unsaved changes
data-av-dirty-guard asks before a reader leaves with edits, and a
[data-av-save-bar] inside the form shows while there are any. Type in the
field to see it.
<form data-av-dirty-guard data-av-demo-submit novalidate>
<div class="av-field">
<label class="av-field__label" for="unsavedName">Workspace name</label>
<input class="av-input" id="unsavedName" name="workspace" value="Northwind">
</div>
<div class="av-save-bar" data-av-save-bar hidden>
<p class="av-save-bar__text">You have unsaved changes</p>
<div class="av-save-bar__actions">
<button class="av-btn av-btn--ghost av-btn--sm" type="reset">Discard</button>
<button class="av-btn av-btn--primary av-btn--sm" type="submit" name="action" value="draft">Save changes</button>
</div>
</div>
</form>