Tesso
Design system starter for Fusor
A collection of composable, accessible components and tokens, yours to edit from day one.
npx tesso-ui init
Why Tesso
Copied into your project
Button, Card, and Dialog are files in your app. Change them there.
A CSS file for tokens
Light and dark values live in public/tokens.css, as raw oklch(). You own that file.
Made for Fusor
Add a component with tesso add. It lands in your project as source you can edit.
Install
Node 20 or newer. The Fusor app stays Node-free until you opt in. Tesso requires Fusor 0.1.7 or newer.
npm install --save-dev tesso-ui npx tesso-ui init npx tesso-ui add button fusor dev
npx tesso-ui and tesso run the same binary. Then link the stylesheets from the init page.
Init
tesso init writes tesso.config.json and public/tokens.css once, with the 19 starter tokens. If that CSS file already exists, init leaves it alone. --force replaces it.
It records an npm devDependency on tesso-ui, and when assets is missing it sets assets = { "/" = "public" }. When Fusor sets tailwind, init writes an @theme inline bridge so utilities such as bg-primary follow .dark.
tesso init --migrate only renames --ft-* variables that have a matching token, and lists the names it left alone.
<link rel="stylesheet" href="/tokens.css" /> <link rel="stylesheet" href="/tesso.css" />
Put .dark on <html> in the app. tokens.css does not read prefers-color-scheme.
Check
tesso check reads public/tokens.css. It does not write the file. A failure names the token and the theme and exits non-zero.
- Every required token is set on
:root, and every color on.dark. - Colors are
oklch()or avar()that resolves to one.--radiusis a length or avar(). - Foreground and background pairs meet WCAG AA 4.5:1 in both themes, including
--primary-foregroundon--destructive.
npx tesso-ui check
Add
tesso add reads one JSON file per component from a single base URL.
The default is https://tesso.fyi/r/, so button is
/r/button.json.
The command prints the registry it used.
--registry takes that base URL or a local folder. CI, tests, and offline use pass a checkout, for example --registry ../registry. tesso.config.json can set the same registry value. The flag wins.
- A missing file is written. An identical file is kept.
- A file that already exists and differs is skipped. add says so and exits 0.
--diffprints the diff and does not write.--forceoverwrites.--overwriteis the same flag.- If this CLI is older than the file’s minimum tesso-ui version, add writes nothing and names the version it needs.
- If the registry cannot be reached, add fails and names the URL.
tesso list prints the same registry. Components require an empty prefix, because they read variables such as --primary.
Button
variant is primary (the default), secondary, quiet, or danger. size is sm, md (the default), or lg. Omit either one and the default is used. on_press is the callback. Focus draws a ring from --ring.
There’s no --destructive-foreground. The danger button uses --primary-foreground for its text.
Example
Card
title and description are static strings. An empty string hides that line. The default slot is the body. slot="footer" fills the footer.
Example
Dialog
Dialog renders a native <dialog> and calls showModal() while open is true. Escape, the backdrop, and the close control set open back to false. The page behind is inert, and focus returns to the control that opened it.
title and description are static strings. An empty one hides that line and omits aria-labelledby or aria-describedby. Adding dialog also adds button, which it depends on.
Example