Use it with any framework
domestic-ui has no React, Vue or Svelte package, and it does not need one. Everything it styles is a native element, a class, a data-* attribute or a custom element, and every templating language can write those. So a framework's only job is the one it is good at: keeping state and turning it into attributes and text.
The pattern
- Write the markup first. Copy it from the docs (every example comes from
examples/) as plain HTML. It renders correctly with no script. - Load the stylesheet once. Link or import
css/domestic.css. Bundlers keep its cascade layers, so your own CSS, if you write any, wins with no specificity tricks. - Import the web components you use. Each
dui-*element is a custom element in light DOM, so the framework renders its children like any other markup and the element upgrades it in place. - Bind state to attributes and text. The framework decides what is true (which order is selected, whether the table is compact). The markup says it the standard way:
aria-current="page",hidden,data-density="compact", arole="status"message.
Nothing in the view knows which framework rendered it. A coding agent can write the markup without a framework in mind, and a person can move a view from one framework to another by changing only the bindings.
One view, six ways
The demo apps build the same dashboard, account settings and orders views with plain HTML, React, Angular, Astro, Vue and Svelte. The markup is the same in each one, and one shared checker (axe in light and dark, small screens, and a scripted walk through the orders view) runs against all six in CI. Only the state layer changes:
| App | Orders view state | Custom elements |
|---|---|---|
| Plain HTML | A short module script reads the form and toggles attributes | Nothing to set up |
| React | useState | React 19 passes custom element attributes through; a .d.ts declares the tags for TypeScript |
| Angular | Signals | CUSTOM_ELEMENTS_SCHEMA on the component |
| Astro | Static HTML plus one client script | Nothing to set up |
| Vue | ref and computed | isCustomElement in the Vite plugin options |
| Svelte | $state and $derived runes | Nothing to set up (custom elements render as is) |
The source of each view in each app is listed under Views.
What the framework should not do
- Restyle. No component library wrapper, no long strings of utility classes, no inline styles beyond setting a documented custom property such as
--stack-gap. Theme through the tokens. - Replace a native element. Keep
<button>,<a href>,<form>,<dialog>,<details>and<table>, so focus, keyboard and form behavior come from the browser. - Fight the web components.
<dui-table>sorts and selects rows in place, so the framework keeps every row rendered and hides filtered rows withhiddeninstead of removing them. Our choice: hiding over removing, because it keeps the row nodes the web component already enhanced. - Break forms without script. Give forms a real
methodandaction. The framework's submit handler improves them. It does not make them work.
Why this matters
Design systems today are mostly published per framework, so the same button is rewritten for each one and the markup drifts. HTML already has a component model that every framework understands: elements, attributes and custom elements. Keeping structure in the document and state in JavaScript is progressive enhancement applied to a whole design system.