Polyxd
An open spec, renderer and verifier for interfaces generated on demand — rendered natively in your design system, operable by people and agents alike, and checked before anyone sees them.
A request comes in. Something — a model, a backend, a rules engine, a person — writes a UI document: a small JSON file of semantic components ("a choice", "a confirmation", "a table") bound to data your app provides. A renderer turns it into your design system's components. A verifier checks it for accessibility, safety and whether an agent can operate it. Then it's used, and thrown away.
request ──► generator (any model or program that emits spec-valid JSON)
│ UI document: meaning only — no pixels, colours or fonts
▼
renderer (@polyxd/react, themed by a design-system pack)
│
▼
verifier → score, findings, agent task results
Site and docs: polyxd.com · Live gallery: polyxd.com/gallery
Packages on npm
All 37 packages are on npm under the @polyxd organisation: the twelve below, the polyxd CLI among them, then thirteen design-system packs and twelve templates.
| Package | What it is | Version |
|---|---|---|
@polyxd/spec |
The spec: components, patterns, the action registry and the JSON Schema | |
@polyxd/react |
The React renderer | |
@polyxd/web |
The Web Components renderer (Vue and Svelte adapters in its README) | |
@polyxd/core |
What both renderers share | |
@polyxd/verifier |
The verifier: schema, patterns, accessibility, contrast and agent tasks | |
polyxd |
The CLI: pack, check, dev, studio push |
|
@polyxd/runtime |
Generates a document with the model you choose | |
@polyxd/server |
A generation server around the runtime (also ghcr.io/visualfart/polyxd-server) |
|
@polyxd/mcp |
An MCP server: the spec, checks and live screens for a host's model | |
@polyxd/a2ui |
Export to A2UI | |
@polyxd/analytics |
Adapters for the renderers' semantic events | |
@polyxd/ds-kit |
Builds design-system packs, including yours with polyxd pack |
What works today
| Spec | 44 semantic components (five of them the product's shell, authored only), 6 patterns with self-checking rules, capability registry with risk levels, Design Direction for a designer's taste, JSON Schema, A2UI export |
| Renderers | @polyxd/react on Radix primitives and @polyxd/web as Web Components, both on @polyxd/core: token-only CSS, container queries, dense B2B tables and navigation, density scale with a touch floor. A conformance suite holds the two to the same DOM, ARIA, text and findings across every document and pack; any renderer can be held to it (Renderers) |
| Events | Both renderers emit semantic analytics events when you pass onEvent: shown, actions, checkpoints, completion, abandonment, input errors, statuses, undo. Keys and codes only, never what anyone typed. They go to your analytics (@polyxd/analytics has PostHog, Segment, GA4 and fetch adapters); Polyxd receives none of them unless you send them to Studio Insights (Events) |
| Design systems | 13 packs on one token contract: Material 3, Carbon, Ant Design, Fluent 2, shadcn/ui, Bootstrap 5, Mantine, Radix Themes, Shopify Polaris, GitHub Primer, Adobe Spectrum 2, GOV.UK Frontend, Chakra UI. Bring your own tokens with npx polyxd pack and it builds a pack from them |
| Verifier | Schema, structure, pattern, capability and copy checks; axe-core, contrast and target-size audits in every pack, mode and width; scripted agents completing tasks through the accessibility tree alone |
All 24 examples score 100 across 1,248 renders (13 packs × 2 widths × light and dark), 936 of 936 agent tasks complete by name alone, and the verifier catches 20 of 20 deliberately injected defects.
There is no bundled model. Any generator that emits spec-valid JSON drives Polyxd. See Bring your generator.
The design systems
| Design system | Pack | Version | |
|---|---|---|---|
| Material 3 | @polyxd/ds-material3 |
||
| IBM Carbon | @polyxd/ds-carbon |
||
| Ant Design | @polyxd/ds-antd |
||
| Microsoft Fluent 2 | @polyxd/ds-fluent |
||
| shadcn/ui | @polyxd/ds-shadcn |
||
| Bootstrap 5 | @polyxd/ds-bootstrap |
||
| Mantine 8 | @polyxd/ds-mantine |
||
| Radix Themes 3 | @polyxd/ds-radix |
||
| Shopify Polaris | @polyxd/ds-polaris |
||
| GitHub Primer | @polyxd/ds-primer |
||
| Adobe Spectrum 2 | @polyxd/ds-spectrum |
||
| GOV.UK Design System | @polyxd/ds-govuk |
||
| Chakra UI 3 | @polyxd/ds-chakra |
Each logo is its owner's own file, unaltered, used to identify the design system a pack is modelled on (where a system has no mark of its own, its company's logo). Several owners' guidelines restrict logo use without permission; each pack's README records the source and the guidelines. GOV.UK's crown and logotype are protected, so it is named in words alone. Twelve original templates (sketch, wireframe, editorial, brutalist, glass, terminal, pastel, civic, finance, health, neon, mono) sit beside them, each with a mark drawn from its own tokens.
The templates
Twelve original packs, made to be copied and changed.
| Template | Pack | Version |
|---|---|---|
| Brutalist | @polyxd/ds-brutalist |
|
| Civic | @polyxd/ds-civic |
|
| Editorial | @polyxd/ds-editorial |
|
| Finance | @polyxd/ds-finance |
|
| Glass | @polyxd/ds-glass |
|
| Health | @polyxd/ds-health |
|
| Mono | @polyxd/ds-mono |
|
| Neon | @polyxd/ds-neon |
|
| Pastel | @polyxd/ds-pastel |
|
| Sketch | @polyxd/ds-sketch |
|
| Terminal | @polyxd/ds-terminal |
|
| Wireframe | @polyxd/ds-wireframe |
Try it
npm install @polyxd/react @polyxd/spec
Render a document:
import { PolyxdSurface } from "@polyxd/react";
import "@polyxd/react/styles.css";
import "@polyxd/react/themes/carbon.css";
<PolyxdSurface
document={doc} // a UI document
data={{ quote }} // your data; the document binds to it
theme="carbon"
mode="light"
onAction={({ name, context }) => { // capabilities the document may trigger
if (name === "transfer.confirm") sendMoney(context.quoteId);
}}
/>
Validate and verify it:
npx polyxd-validate my-ui.json # schema and structural rules, from @polyxd/spec
npm install -D @polyxd/verifier playwright && npx playwright install chromium
npx polyxd-verify my-ui.json --themes carbon # rendered light and dark, phone and desktop; axe, contrast, layout
Point it at your design system:
npx polyxd pack ./src/tokens.css
It reads your CSS custom properties, maps what it can onto the contract, writes a pack plus a mapping file of every guess it made, and reports what's still missing — including any of your own colour pairs that fail contrast. How it guesses.
| Package | |
|---|---|
@polyxd/core |
The framework-free core every renderer shares: types, bindings, formatting, the renderer's decisions, a headless surface |
@polyxd/react |
The React renderer, with compiled theme CSS for every pack |
@polyxd/web |
The Web Components renderer: <polyxd-surface>, <polyxd-frame>, no framework; Vue and Svelte adapters to copy |
@polyxd/analytics |
Sends the renderers' semantic events (what people do on a screen, never what they type) to your own PostHog, Segment, Google Analytics 4 or endpoint, through an allow-list guard. Polyxd receives none of them, unless you send them to Studio Insights. On npm. The renderers emit the events from 0.4.1 on |
@polyxd/spec |
Types, JSON Schema, validator, patterns, token contract; polyxd-validate |
@polyxd/verifier |
polyxd-verify: static, rendered and agent checks |
polyxd-spec (Python) |
The schemas, component catalogue and validator for Python, with the same results as @polyxd/spec; polyxd-spec validate. In packages/python-spec, not yet on PyPI |
@polyxd/a2ui |
Export to A2UI v1.0 |
@polyxd/runtime |
Generates a document for an ask with the model you choose, with your Design Direction applied: validation and repair, streaming, and interface memory on the client |
@polyxd/mcp |
MCP server (npx -y @polyxd/mcp): the spec for the host's model, validation and verification, and an MCP App that shows the screen in any pack. Also hosted at https://mcp.polyxd.com/mcp |
@polyxd/server |
Generation server: the runtime behind an HTTP API (POST /v1/generate, JSON or server-sent events), pointed at the model you choose; a Docker image or npx @polyxd/server |
polyxd |
The polyxd command: pack and check |
@polyxd/ds-kit |
The library behind polyxd pack |
@polyxd/ds-* |
The thirteen packs as DTCG tokens, for building your own themes, plus twelve original templates to start from (sketch, wireframe, editorial, brutalist, glass, terminal, pastel, civic, finance, health, neon, mono). The renderer already includes their CSS |
From source
Tested on Node 26; the repository's scripts run TypeScript directly, so you need a Node that strips types without a flag.
git clone https://github.com/visualfart/polyxd.git && cd polyxd
npm install
npm run dev -w @polyxd/gallery # every example, in every pack, at phone, tablet and desktop
npm run test:all # every workspace's tests, with one total
npm run verify:packs -w @polyxd/verifier # the 1,248 renders
npm run conformance -w @polyxd/verifier # both renderers, every document, 13 packs: same DOM, ARIA, text and findings
Polyxd is for surfaces, generated or authored. A designer can write the same document on purpose, as a screen of the product; it renders in
