Repository navigation
v3.0.0
Accesserty UI Kit 3.0.0
3.0.0 is a major release. Vue, Nuxt, React and Next.js can now bind the form
components the way they bind native fields, and accordion, tabs and breadcrumbs
can render their Shadow DOM on the server. The component tags, attributes and
properties are unchanged, but custom events are renamed and a few other
details change. Read "What breaks" and "How to upgrade" below before you
replace your copy of the kit.
Plain HTML pages keep working the same way: copy a file, add a <script> tag,
use the <au-*> elements.
Highlights
v-modelin Vue and Nuxt onau-input,au-textarea,au-checkbox,
au-switch,au-radio-group,au-ratingandau-file-upload, following
Vue's own rules for native fields. A group of checkboxes can share one array
orSet,true-value/false-valuework,type="number"inputs give
numbers, and<au-radio :value="2">gives2. Server rendering supports it too.- A Nuxt module. Add one line to
modulesin place of a client plugin, the
isCustomElementsetting and<ClientOnly>wrappers. - React components for React 19 and Next.js:
AuInput,AuTextarea,
AuCheckbox,AuSwitch,AuRadioGroup,AuRatingandAuFileUpload. They
takevalue/checked,defaultValue/defaultChecked,onChangeand a
ref to the element.e.targetbehaves like a native field, withvalue,
checked,valueAsNumberandvalueAsDate. - Server rendering of Shadow DOM (Declarative Shadow DOM) for accordion,
tabs and breadcrumbs. They have their final look and layout before any
JavaScript runs, so the page doesn't jump when the script loads or fails.- Nuxt: on by default.
- Self-hosted Next.js: one wrapper,
withDeclarativeShadow. It doesn't work on
Vercel. - Any other Node server:
injectDeclarativeShadow.
- Native form API on every form component:
setCustomValidity()and
form, alongsidevalidity,checkValidity()andreportValidity().
au-inputalso getsvalueAsNumberandvalueAsDate. Pressing Enter in an
au-inputstill does not submit the form, on purpose. - Single-component files in
dist/components/. All 15 components are there,
each as a self-contained file plus a minified copy (tabs.min.js: 13 KB
instead of 21 KB). - TypeScript declarations.
accesserty-ui-kit.d.tstypes every element, for
exampledocument.querySelector('au-tabs').selectedIndex. The React file adds
everyau-*tag to JSX with typed event details. Vue typesv-modelin
templates. - One disabled look. Every component and native button dims to opacity 0.6,
which keeps dark text at about 5:1 on white. Each component has a
--au-…-disabled-opacityvariable to change it.
What breaks
| 2.0.10 | 3.0.0 | What to do | |
|---|---|---|---|
au-tabs event |
tab-change |
au-tab-change |
Rename the listener |
au-carousel event |
slide-change |
au-slide-change |
Rename the listener |
au-pagination events |
page-change, page-size-change |
au-page-change, au-page-size-change |
Rename the listeners |
au-dropdown-item event |
selected |
au-select |
Rename the listener |
au-file-upload event |
remove-file |
au-remove-file |
Rename the listener |
Cascade layer of au-style.css |
components |
accesserty |
Rename it in your @layer order, if you declared one |
| Copying one component | src/components/<name>.js |
dist/components/<name>.js or <name>.min.js |
Copy from dist/components/; the files in src/ are ES modules now |
au-accordion-item with open in the markup |
Sends au-toggle when the script loads |
Sends nothing, because nothing changed | Read item.open for the initial state |
| Ids inside accordion and tabs Shadow DOM | Random | Fixed (title, region, tab-1…) |
Only matters if your code read them |
The old event names are no longer sent; there is no transition period. These
events keep their names: au-toggle, the native change and input on form
components, and au-tree's change.
In React, ontab-change becomes onau-tab-change. In Vue, @tab-change
becomes @au-tab-change.
Compared with 2.0.10
All fixes from 2.0.8, 2.0.9 and 2.0.10 are included.
| 2.0.10 | 3.0.0 | |
|---|---|---|
| Vue / Nuxt forms | :value + @input, :checked + @change |
v-model (the old bindings still work) |
| Nuxt setup | Client plugin, isCustomElement, <ClientOnly> |
One module |
| React / Next forms | <au-input> tags with on… props (React 19), or a ref and addEventListener (React 18) |
AuInput… with value / onChange (React 19); the tags still work |
| Server-rendered Shadow DOM | — | accordion, tabs, breadcrumbs |
setCustomValidity(), form |
— | All 7 form components |
valueAsNumber, valueAsDate on au-input |
— | Yes |
Validity API on au-rating, au-file-upload |
Missing | Same as the other form components |
| Disabled opacity | 0.35–0.65; au-input had no disabled look |
0.6 everywhere, one variable per component |
| Event names | Mixed | All start with au- (except tree's change) |
| Single-component files | src/components/*.js |
dist/components/*.js and *.min.js |
| TypeScript | — | Elements, events, JSX tags, Vue v-model |
accesserty-ui-kit.js / .min.js |
260 KB / 197 KB | 252 KB / 190 KB |
Integration files in dist/ |
— | Vue, React, Nuxt, SSR (ES modules, each with .d.ts) |
package.json exports |
., ./min |
Also ./vue, ./react, ./nuxt, ./ssr, each with types |
| Unit tests | 456 | 485 |
| Browser suites (Chrome, Firefox, Safari) | 10 | 12 (adds server rendering and single files) |
| Framework checks | Next, Nuxt | Also Nuxt v-model, Vue SPA, Next React, server-rendered Shadow DOM, TypeScript |
How to upgrade
The full guide is in UPGRADING.md.
-
Replace the kit. Copy the whole new
dist/folder over your copy. The
integration files import each other by relative path. If you copied single
components, copy them fromdist/components/instead ofsrc/components/. -
Rename event listeners using the table above. Searching your code for
tab-change,slide-change,page-change,page-size-change,selected
andremove-filefinds them. -
CSS: if you use
au-style.css, copy the newsrc/css/folder. Rename
anycomponentslayer that you ordered for the kit toaccesserty:@layer base, accesserty, components, utilities;
-
Vue: use the kit's
isCustomElementinstead of
tag => tag.startsWith('au-'), and install the plugin:import { AccessertyVue, isCustomElement } from './vendor/accesserty/accesserty-ui-kit-vue.js' createApp(App).use(AccessertyVue).mount('#app') // vite.config.js: vue({ template: { compilerOptions: { isCustomElement } } })
Your
:value/@inputbindings keep working. Switch tov-modelwhen you
like. -
Nuxt: remove your client plugin, the
isCustomElementsetting and any
<ClientOnly>you added for the kit, then add the module:export default defineNuxtConfig({ modules: ['./vendor/accesserty/accesserty-ui-kit-nuxt.js'] })
-
React / Next.js (optional): switch form fields to the React components,
and calldefineElements()once in a client effect:import { AuInput, defineElements } from './vendor/accesserty/accesserty-ui-kit-react.js' useEffect(() => { defineElements() }, []) <AuInput label="Email" value={email} onChange={e => setEmail(e.target.value)} />
For server-rendered accordion, tabs and breadcrumbs, run a custom server
withwithDeclarativeShadow. -
Check disabled fields if your design depends on their old opacity. Set
--au-<component>-disabled-opacity(--au-btn-disabled-opacityfor native
buttons and pagination) to keep the previous value.
Support for 2.x
2.x gets bug fixes only. New features land in 3.x.