Copy the code. Keep the updates.
labsUI components live in your repo as plain TSX you can edit. When a new version ships, update merges it with your edits, and a coding agent can read the exact props before it writes a line.
Updates that keep your edits
Editing a component doesn't cut it off from new versions. labsUI records which version wrote each file, so it can tell your changes from its own.
$ labsui diff toast +18 -98 src/components/ui/toast.tsx (your edits and labsUI's since 0.1.12; update merges them) utils +0 -9 src/lib/utils.ts (only labsUI changed it since 0.1.12; update replaces it)$ labsui update toast✓ toast merged✓ Wrote 2 file(s): src/lib/platform.ts src/components/ui/kbd.tsx• Kept dependencies that differ from this version (older or edited): utilstoast.tsx edited by hand, updated to a later version. The hand edit is still in the file.diff- Lists what differs from this version and whose change each file is: only labsUI's, only yours, or both.
update- Replaces files you never edited and merges the rest three ways. Where both sides changed the same lines, it adds conflict markers and lists the file.
doctor- Checks the setup and prints a fix for each problem. It exits with 1 when something is broken, so it can run in CI.
The merge base comes from JSR, which keeps every release's files. Offline, or for items installed before versions were recorded, edited files are left as they are.
Exact props for coding agents
The CLI is also an MCP server. Props come from each component's TypeScript types, so an agent reads what the code accepts, not a summary of it.
{ "mcpServers": { "labsui": { "command": "npx", "args": ["-y", "@kznlabs/labsui", "mcp"] } }}| Tool | What it does |
|---|---|
search | Finds items by name, export or intent. |
view | Exact props and types, usage, examples, what an item brings along. |
add | Installs items and what they import. Never overwrites a file. |
init | One-time setup. Returns the code the root layout needs. |
diff | A patch per changed file, and whose change it is. |
update | Replaces unedited files and merges edited ones three ways. |
doctor | Checks the setup and gives a fix for each problem. |
On connect the server also sends the library's coding rules. Without MCP, --json works on every command, labsui rules prints the rules, and the docs come as an index or one full file.
Checks that run on every page
Every day, CI opens all 93 component pages in Chromium, Firefox and WebKit, at 390 and 1280 px, in light and dark.
| Check | Required |
|---|---|
| WCAG 2.2 A + AA rules (axe) | 0 violations |
| JavaScript errors | none |
| Sideways page overflow | none |
| Every control reachable by a click | pass |
| Scroll containers move under the wheel | pass |
| Menus, popovers, tabs, sliders, Escape, focus | pass |
| Pointer targets | 24 × 24 px or larger |
| Text contrast, both themes | 4.5:1 or higher |
Behavior the docs promise, like a required field blocking submit or a form control going back to its default on reset, has its own tests. You can read the latest runs and the tests themselves.
Automated checks find many problems, not all: axe covers roughly half of the WCAG criteria, so this is not a full conformance audit. Not covered yet: screen reader passes, real phones, Samsung Internet and other less common browsers.
How it's built
A small set of rules that every component follows, so what you learn from one holds for the next.
- Your code
- The CLI writes plain TSX into your repo, and no labsUI package ends up in your bundle. It has no dependencies and carries the registry inside, so each version installs the same code, offline too.
- One spring
- Every animation shares { type: "spring", stiffness: 400, damping: 30 }, and reduced motion is respected everywhere.
- The platform first
- Form controls use native constraints, so forms validate without JavaScript and work with Server Actions.
- Tokens
- Colors are OKLCH tokens, with light and dark themes and eight accent presets tuned for AA contrast.
Is it a fit?
Good fit
- You build with React 19 and Tailwind CSS v4, in Next.js or another React framework.
- You change components to suit your product and still want new versions.
- A coding agent writes part of your UI and should read real props, not guess them.
- You want forms built on native validation that work with Server Actions.
- You want motion to feel the same across the whole product.
Not a fit
- You want unstyled headless primitives. labsUI ships a look, set by its tokens and classes.
- Your app can't move to React 19 or Tailwind CSS v4. Both are required.
- You need a large ready-made ecosystem of themes, templates and answers online. labsUI is young and doesn't have one yet.
- You need a finished accessibility audit. The checks are automated; screen reader and real phone passes haven't been done.