A design system card surrounded by swatches, a corner radius piece, a cube ruler and type bars

Design systems · new in 0.10.0

Design systems

Describe a brand once, as one JSON document, and every Texuli surface follows it: components, layouts, dashboards, decks, documents, email, PDF, DOCX, PPTX, canvas exports and the Kotlin twin. The document is data only, so an agent can write one without emitting CSS or script, and the compiler enforces contrast, focus and target-size guarantees instead of reporting them.

Explore the Design Systems Solution

Status:Design systems shipped in 0.10.0 and are on npm in the 0.18 line (texuli@^0.18.0 and @texuli/tokens@^0.18.0), a pre-1.0 release: under 0.x a new minor may contain breaking changes. Earlier lines have the theme engine and token contract v2, but not the design-system document, its compiler or the texuli ds commands.

What a design system is

A closed JSON document (format: "texuli/design-system"): identity, then optional sections for color, typography, shape, space, elevation, surface, motion, layout, icons, component defaults, assets, voice, accessibility targets and variants. Lengths are numbers, colors are values, and nothing is raw CSS. The smallest valid document is a brand color:

{
  "format": "texuli/design-system",
  "formatVersion": 1,
  "id": "harborline",
  "version": "1.0.0",
  "name": "Harborline",
  "color": { "brand": { "seed": "#0e7490" } }
}
  1. Validate: the spec checks the closed shape and answers with stable codes and JSON paths, so a person or an agent repairs a document from the code alone.
  2. Compile: concrete --tx-* variables per mode. Text pairs meet the declared target (AA 4.5:1 or AAA 7:1), the focus ring 3:1 at 2 px or wider, and controls the declared target size; the compiler refuses only what pinned colors make impossible.
  3. Apply or emit: DesignSystemProvider or applyDesignSystem on any element, designSystemStyle for server HTML, and emitters for CSS, a Tailwind preset, DTCG, Tokens Studio, email, PDF, DOCX, PPTX, canvas and Kotlin tokens.

Three brands, four surfaces

Three fictional brands from the repository's examples/design-systems folder, compiled when this page was built and applied through DesignSystemProvider. Each surface below is the same markup and the same content; only the design system changes. The previews show light mode, and they ship no JavaScript.

  • Quillmark

    [email protected] · seed #b4532a

    A literary magazine: warm paper neutrals, a terracotta seed, a serif body.

    A brand seed with a warm neutral, type families and roles, flat surfaces, outline buttons by default.

  • Ledgerline

    [email protected] · extends texuli:slate-masthead · seed #1d4ed8

    A finance back office: dense spacing, 14 px base type, crisp edges.

    extends: "texuli:slate-masthead", small buttons by default, a high-contrast variant held to AAA.

  • Tumbletown

    [email protected] · seed #d6336c

    A family game studio: 20 px radius, pill buttons, expressive motion.

    The brand pink pinned exactly, 44 px targets (control heights lifted), a glow focus ring.

Brand fonts are named in each document but not loaded on this site, so each preview falls back along its font stack.

Dashboard

Stat cards, a bar chart on the chart palette and a table: density, radius, elevation and type scale all move with the brand.

  • Revenue

    $48.2k

    Increased: +4%

    Orders

    1,284

    Increased: +12%
    Region Orders Change
    East 512 +9%
    West 431 +15%
    South 341 +11%
    Dashboard under Quillmark
  • Revenue

    $48.2k

    Increased: +4%

    Orders

    1,284

    Increased: +12%
    Region Orders Change
    East 512 +9%
    West 431 +15%
    South 341 +11%
    Dashboard under Ledgerline
  • Revenue

    $48.2k

    Increased: +4%

    Orders

    1,284

    Increased: +12%
    Region Orders Change
    East 512 +9%
    West 431 +15%
    South 341 +11%
    Dashboard under Tumbletown

Deck slide

A title slide on the brand fill, with the on-fill text color the compiler holds to the contrast target.

  • Quarterly review

    Orders grew 12% this quarter

    • Shipping took 2.1 days on average
    • Returns fell to 1.8%

    Harbor Supply · fictional data

    Deck slide under Quillmark
  • Quarterly review

    Orders grew 12% this quarter

    • Shipping took 2.1 days on average
    • Returns fell to 1.8%

    Harbor Supply · fictional data

    Deck slide under Ledgerline
  • Quarterly review

    Orders grew 12% this quarter

    • Shipping took 2.1 days on average
    • Returns fell to 1.8%

    Harbor Supply · fictional data

    Deck slide under Tumbletown

Document page

Title, lead, list, quote, callout and badges, set in the type roles of each brand.

  • Release notes, week 44

    Type roles, spacing and colors all come from the design system.

    • The orders dashboard loads twice as fast.
    • Exports keep the brand colors.
    Best week of the quarter, and the calmest on-call yet.

    Heads up

    Two products are low on stock.

    Shipped Week 44

    Document page under Quillmark
  • Release notes, week 44

    Type roles, spacing and colors all come from the design system.

    • The orders dashboard loads twice as fast.
    • Exports keep the brand colors.
    Best week of the quarter, and the calmest on-call yet.

    Heads up

    Two products are low on stock.

    Shipped Week 44

    Document page under Ledgerline
  • Release notes, week 44

    Type roles, spacing and colors all come from the design system.

    • The orders dashboard loads twice as fast.
    • Exports keep the brand colors.
    Best week of the quarter, and the calmest on-call yet.

    Heads up

    Two products are low on stock.

    Shipped Week 44

    Document page under Tumbletown

Email

An email composition; the real email HTML comes from @texuli/tools/email with the same design system.

  • Email under Quillmark
  • Email under Ledgerline
  • Email under Tumbletown

Conformance

Every number below is read from the compiler's report when this page was built, through checkDesignSystem: the static half of texuli ds check (the spec's validation, the extends chain, the compile of the document and of its high-contrast variant, then the guarantees checked again over the compiled variables).

Contrast pairs passing per mode, target sizes and solver moves, per brand and run
Brand and runTargetLight pairsDark pairsTightest text pair (light)Control heightsSolver movesResult
Quillmark, BaseAA, 24 px targets74 of 7474 of 744.98:1 (needs 4.5:1)4 of 40Passes
Ledgerline, BaseAA, 24 px targets74 of 7474 of 745.06:1 (needs 4.5:1)4 of 40Passes
Ledgerline, high-contrast variantAAA, 24 px targets74 of 7474 of 747.09:1 (needs 7:1)4 of 40Passes
Tumbletown, BaseAA, 44 px targets74 of 7474 of 744.61:1 (needs 4.5:1)4 of 47Passes

Pairs are text on every surface role (4.5:1 at AA, 7:1 at AAA), strong borders and inputs (3:1), and the focus ring against the page and the surface (3:1). Control heights are the control sizes held to the brand's target size. A solver move is a color or a size the compiler changed to meet a guarantee, per mode: Tumbletown's are its control heights lifted to its 44 px target and the text color on its pinned pink in dark mode.

Run the same check on a brand, or on your own document:

texuli ds check examples/design-systems/quillmark.json
texuli ds check examples/design-systems/ledgerline.json
texuli ds check examples/design-systems/tumbletown.json

--render also paints every agent-emittable catalog component under the design system in headless Chromium and checks axe, the painted contrast of every pair and colors that ignore the design system; CI runs it on these three brands. Details: texuli ds check.

Start one

In the browser: the studio

Start from a seed color, a logo, a library theme or a DTCG or Tokens Studio file; edit every section; preview five surfaces; read the contrast report and the diff; export every format; share the document in a link. Nothing leaves the page.

Open the design system studio

In a terminal: texuli ds

Eight commands in @texuli/tools: init, validate, compile, preview, diff, import, export and check. Exit 0 when valid, 1 when refused.

texuli ds init brand.ds.json --name Harborline       # a starter document
texuli ds validate brand.ds.json                     # stable codes and JSON paths
texuli ds compile brand.ds.json --format css --out dist/brand.css
texuli ds preview brand.ds.json --format svg --out review/brand.svg
texuli ds diff brand.ds.json next.ds.json            # changed variables, contrast regressions
texuli ds import tokens/brand.tokens.json --from dtcg --out imported.ds.json
texuli ds export brand.ds.json --format dtcg --out tokens/brand.tokens.json
texuli ds check brand.ds.json --render               # the conformance check

Every command and operation

With an agent: the MCP

The same operations as MCP tools, on the local server (npx -y @texuli/mcp) and the remote one at https://texuli.com/mcp:

  • blueprint.theme: Apply a design system to a blueprint
  • ds.validate: Validate a design system
  • ds.compile: Compile a design system
  • ds.contrast: Report design-system contrast
  • ds.suggest: Suggest a design system
  • ds.import: Import a design system
  • ds.generate: Generate a design-system draft
  • ds.allow: List allowed components for a locked design system
  • ds.bundle: Pack or unpack a portable design-system bundle
  • ds.diff: Diff two design systems
  • ds.preview: Preview a design system
  • ds.save: Save a design system to a file (local only)

The prompt create-design-system walks an agent from a brief to a validated document.

The resource texuli://design-system/{id} serves the example brands and every library theme as a document.

Connect your agent

Read the guide

Authoring by hand or from tokens you already have, the validation codes, compile and apply, patches and variants, versioning, distribution, migrating from themes, the guarantees and every output.

The design systems guide

See the whole loop

Generate a draft from brand inputs, review it in the kit, approve it in a commit, lock prototypes to the allowed set and share it as a versioned bundle.

The Design Systems Solution