Build
Design language
Your tab or home page fills a panel inside the workspace, beside its own tabs. When it uses the same colours, type, spacing and parts, people read it as part of their workspace, not something bolted on. This page sets out how the workspace looks, and gives you a stylesheet with all of it.

Use the stylesheet
The workspace's look comes as a stylesheet with its fonts and icons: the same files as the workspace's own, so its colours, type and spacing are the app's. Where you get it depends on where your page lives.
A tab without a server (or one an agent builds): the workspace serves it beside your files, as tands-design/, so there's nothing to copy, and it's always the deployment's own. Link it:
<link rel="stylesheet" href="tands-design/tabs-and-spaces.css" />A page on your own server: it's in @tabs-and-spaces/sdk, in design/. With a bundler, import it; otherwise copy the folder beside your page and link it as above. tands new copies it in for you.
import "@tabs-and-spaces/sdk/design/tabs-and-spaces.css";Or download it: tabs-and-spaces.css, with the fonts it loads from fonts/ beside it and icons.js. The version it comes from is in its first line.
It has four parts:
| Part | What it is |
|---|---|
| Fonts | Inter, as the workspace uses it (SIL Open Font License 1.1, in fonts/OFL.txt). Without the files, your page uses the device's own sans-serif |
| Tokens | Every colour, size, space, radius, shadow and timing as a CSS variable, in light and dark: var(--color-text), var(--space-4), var(--radius-md) |
| Base styles | A small reset: the page's background, text, font and line height, headings, links, focus rings, and no motion for those who ask for less |
| Parts | Buttons, fields, choices, cards, rows, lists, numbers, tables, badges, notices, menus, dialogs, icons and empty states, as classes starting ts-, so they never clash with yours (below) |
Use the tokens even where you don't use the parts. A colour written as var(--color-text-muted) stays right in both themes and with the workspace's accent; one written as #666 doesn't.
Follow the workspace
The tokens follow data-theme on <html> (light or dark; without it, the device's), and the workspace's own colours when they're set on it. Connect with applyTheme, and the SDK does both, and keeps them up to date as the reader switches theme or the workspace changes its accent:
const tands = await connect({ applyTheme: true });To do it yourself, tands.theme and tands.styles (the colours, as CSS variables) say what they are now, and onTheme((theme, styles) => …) when they change. See the SDK.
Principles
- Content first, chrome last. The interface recedes; people's work comes forward. No decoration that doesn't help someone read or act.
- Almost all black and white. Warm neutrals, like paper and stone, not screen grey. Hierarchy comes from contrast, weight, size and space, not from hue.
- Colour means something. It's kept for a few moments: something failed or can't be undone (danger), something worked (success), something new arrived, a chart's series, and the workspace's own accent.
- Type does the work. One sans-serif, a tight scale, semibold for titles, medium for labels, regular for reading.
- A strict rhythm. Spaces on a 4 px grid, a few radii, hairline borders used sparingly.
- Quiet motion. Short, purposeful transitions; none at all for those who ask for less.
- Light and dark are equals. Every screen is designed in both.
- Accessible by default. Text passes WCAG AA in both themes, focus is always visible, and nothing is said by colour alone.
What it is not: gradients, glows, emoji confetti, sparkle icons, a card around every paragraph, or a colour for every category.
Colour
Each swatch shows light on the left and dark on the right. A page uses the token, never the value, so it follows the theme.
Surfaces
| Token | Light · dark | For |
|---|---|---|
--color-canvas | #ffffff · #151514 | Your page's background: the panel tabs sit in |
--color-surface | #f7f6f3 · #1b1b19 | Quiet fills: number tiles, wells, a code block |
--color-surface-raised | #ffffff · #222220 | Things raised above the page: fields, menus, a chosen option |
--color-backdrop | #f3f2ef · #0b0b0a | The app's frame, around the panel; rarely yours |
Hover and pressed states darken whatever is under them, in both themes: --color-hover for a hover, --color-active for something pressed or chosen.
Lines
| Token | Light · dark | For |
|---|---|---|
--color-border | #ebe9e4 · #262624 | Hairlines: cards, lists, between rows |
--color-border-strong | #dcd9d2 · #353532 | Fields, and lines that must be seen |
Borders are always var(--border-width): 1 px.
Text
| Token | Light · dark | For |
|---|---|---|
--color-text | #1a1917 · #edece8 | Everything people read first |
--color-text-muted | #57544e · #aeaca6 | Details under a name, descriptions, quiet labels |
--color-text-subtle | #6b6862 · #8f8d87 | Hints, placeholders, times, counts |
All three pass WCAG AA on the canvas, the surface and the backdrop. Don't go lighter.
Emphasis and status
| Token | Light · dark | For |
|---|---|---|
--color-accent | #1a1917 · #edece8 | The main action, a switch that's on, what's chosen. Ink by default |
--color-on-accent | #ffffff · #151514 | Text on the accent |
--color-danger | #b42318 · #f97066 | Errors, and actions that can't be undone |
--color-success | #1f7a4d · #47cd89 | Done, connected, saved |
--color-notify | #c26a12 · #f0a54a | Something new arrived |
--color-accent-hover and --color-focus-ring go with them. Focus rings and a field's glow are drawn with var(--color-focus-ring) and var(--ring).
The workspace's accent
A workspace may choose its own accent (in Workspace settings → General); the app's buttons, switches, focus rings and what's new then take that colour. Your page is told it too, as --color-accent, --color-accent-hover, --color-on-accent, --color-focus-ring and --color-notify for the theme it's in, and with applyTheme they're set on your page. So use --color-accent for what the app uses it for (the main action, what's chosen), and your page takes the workspace's colour with the rest. Without an accent, it's the default ink.

Charts
The one place hue carries meaning: a chart's series, always in this order, never cycled. A seventh series goes into "Other".
| Token | Light · dark |
|---|---|
--color-chart-1 | #2a78d6 · #3987e5 |
--color-chart-2 | #eb6834 · #d95926 |
--color-chart-3 | #1baf7a · #199e70 |
--color-chart-4 | #eda100 · #c98500 |
--color-chart-5 | #e87ba4 · #d55181 |
--color-chart-6 | #008300 · #008300 |
Some of these are lighter than text should be, so a chart always has a legend (or its series named beside their lines) and a way to see its numbers as a table. One axis only: two measures of different sizes are two charts. In an agent's answer, a chart card does all this for you.
Type
| Token | Size | For |
|---|---|---|
--text-xs | 12 px | Badges, counts, small print |
--text-sm | 13 px | Labels, details, hints, secondary buttons |
--text-md | 14 px | The base: body text, buttons, fields |
--text-lg | 16 px | Reading text, a card's title |
--text-xl | 20 px | A tab's title |
--text-2xl | 24 px | A number at a glance |
--text-3xl | 32 px | A home page's welcome |
--text-4xl | 44 px | Rarely: one large figure |
- Weights:
--weight-regular(400) to read,--weight-medium(500) for labels, names and buttons,--weight-semibold(600) for titles. Nothing bolder. - Headings are semibold, with tight line height (
--leading-tight) and letters drawn in (--tracking-tight). The base styles do this forh1toh4. - Line height:
--leading-normal(1.5) for text,--leading-snug(1.35) for short lines in small sizes. - Sentence case everywhere: titles, buttons, tabs. Never all capitals.
- Numbers that line up or change in place use
font-variant-numeric: tabular-nums. - Code is in
--font-mono.
Space and shape
Every gap and padding is on a 4 px grid:
| Token | Size |
|---|---|
--space-0-5, --space-1, --space-1-5 | 2, 4, 6 px |
--space-2, --space-3, --space-4 | 8, 12, 16 px |
--space-5, --space-6, --space-8 | 20, 24, 32 px |
--space-10, --space-12, --space-16 | 40, 48, 64 px |
A few radii, by size: --radius-sm (6 px) for small controls, --radius-md (9 px) for buttons and fields, --radius-lg (14 px) for cards and lists, --radius-xl (18 px) for large panels, and --radius-full for pills, dots and avatars.
Controls are --control-height-md (36 px) tall, or --control-height-sm (30 px) in tight rows.
Shadows are warm and layered, and lean on a hairline in dark mode: --shadow-xs for raised controls, --shadow-sm for small cards, --shadow-panel for panels, --shadow-popover for menus and dialogs. Most cards need none: a hairline is enough.
Motion
| Token | Time | For |
|---|---|---|
--duration-fast | 120 ms | Hover, press, a colour changing |
--duration-base | 200 ms | A switch moving, a panel opening |
--duration-slow | 320 ms | Larger moves |
Ease out with --ease-out; move and back with --ease-in-out. The durations become zero for people who ask their device for less motion, and the base styles stop animations for them too.
Parts
Each part below is drawn by the stylesheet, as you see it here. Copy the markup and fill it in.
Buttons
One main action per view, in ink; everything else raised paper, or quiet in a row. Red only for what can't be undone.
<button class="ts-button" type="button">New request</button>
<button class="ts-button" type="button" data-variant="secondary">Export</button>
<button class="ts-button" type="button" data-variant="ghost">Cancel</button>
<button class="ts-button" type="button" data-variant="danger">Delete for good</button>
<button class="ts-button" type="button" data-variant="secondary" data-size="sm">Small</button>A button says what it does: Save request, not Submit or OK.
Fields
A label above, a hint or error below. Mark a wrong value with aria-invalid="true" and say why.
<label class="ts-field">
<span class="ts-label">Client</span>
<input class="ts-input" placeholder="Harbour Café" />
<span class="ts-hint">Who asked for it.</span>
</label>
<textarea class="ts-input"></textarea>Choices
A segmented control for two to five views or options, a switch for something that takes effect at once, and a select for longer lists.
<div class="ts-segmented" role="radiogroup" aria-label="Show">
<label><input type="radio" name="show" checked /><span>Open</span></label>
<label><input type="radio" name="show" /><span>Done</span></label>
</div>
<button
class="ts-switch"
type="button"
role="switch"
aria-checked="true"
aria-label="Email me"
></button>
<span class="ts-select">
<select aria-label="Sort">
<option>Newest first</option>
<option>Due soonest</option>
</select>
</span>A switch's aria-checked is yours to turn: flip it on click.
Cards and rows
Settings and details sit in a card with hairlines between rows: what it is on the left, its control on the right. On a phone the control goes underneath.
<div class="ts-card">
<div class="ts-row">
<div class="ts-row-text">
<span class="ts-row-label">Email me new requests</span>
<span class="ts-row-hint">At most one email an hour.</span>
</div>
<button
class="ts-switch"
type="button"
role="switch"
aria-checked="false"
aria-label="Email me new requests"
></button>
</div>
</div>For free-form content in a card, use <div class="ts-pad">.
Lists
Things in a list: a name, a line of detail, and their state at the end.
- New menu photosHarbour Café · due Thursday Open
- Logo in two coloursWillow & Pine · due today Overdue
- Spring newsletterFernhill Books Done
<ul class="ts-list">
<li>
<span class="ts-item-text">
<span class="ts-item-name">New menu photos</span>
<span class="ts-item-detail">Harbour Café · due Thursday</span>
</span>
<span class="ts-badge">Open</span>
</li>
</ul>Numbers at a glance
<div class="ts-stats">
<div class="ts-stat"><strong>12</strong><span>Open</span></div>
<div class="ts-stat"><strong>3</strong><span>Due this week</span></div>
</div>Status
A badge names a state in a word; data-tone adds colour to the word, never in place of it. A dot sits beside a word, and a notice says something to read before going on.
Requests from clients arrive here when they email the studio.
The client's site couldn't be reached. Try again in a minute.
<span class="ts-badge" data-tone="success">Done</span>
<span class="ts-dot" data-tone="success"></span>
<p class="ts-notice" data-tone="danger">
The client's site couldn't be reached. Try again in a minute.
</p>Tables
Rows of figures: in a hairline box that scrolls sideways on its own. Figures line up on the right (data-align="end").
| Client | Requests | Hours |
|---|---|---|
| Harbour Café | 5 | 12.5 |
| Willow & Pine | 3 | 8.0 |
| Fernhill Books | 2 | 3.5 |
<div class="ts-table-wrap">
<table class="ts-table">
<thead>
<tr>
<th>Client</th>
<th data-align="end">Hours</th>
</tr>
</thead>
<tbody>
<tr>
<td>Harbour Café</td>
<td data-align="end">12.5</td>
</tr>
</tbody>
</table>
</div>Menus
A menu is a native popover: a button opens it with popovertarget, and its items close it with popovertargetaction="hide" (or do something first, in a click handler). It opens under its button where the browser can place it, and in the middle of the page where it can't. Escape and a click outside close it.
Call menus() once, from menus.js beside the stylesheet (or @tabs-and-spaces/sdk/design/menus), and they move as the workspace's do: opening one puts focus on its first item, ↓ and ↑ move between items (round the ends, past disabled ones), Home and End go to the first and last, and Tab closes it.
import { menus } from "./tands-design/menus.js";
menus();<button class="ts-button" type="button" data-variant="secondary" popovertarget="more">More</button>
<div class="ts-menu" id="more" popover>
<span class="ts-menu-label">Request</span>
<button class="ts-menu-item" type="button" popovertarget="more" popovertargetaction="hide">
Rename
</button>
<div class="ts-menu-separator"></div>
<button
class="ts-menu-item"
type="button"
data-tone="danger"
popovertarget="more"
popovertargetaction="hide"
>
Delete
</button>
</div>aria-checked="true" on an item ticks it (a choice, like a sort order).
Dialogs
A dialog is a native <dialog>, opened with showModal(): the page behind waits, Escape closes it, and a <form method="dialog"> inside closes it with its buttons. On a phone it comes up from the bottom.
<dialog class="ts-dialog" id="confirm">
<div>
<h2 class="ts-dialog-title">Delete this request?</h2>
<p class="ts-dialog-description">It can't be brought back.</p>
</div>
<form method="dialog" class="ts-dialog-footer">
<button class="ts-button" data-variant="secondary" value="cancel">Cancel</button>
<button class="ts-button" data-variant="danger" value="delete">Delete request</button>
</form>
</dialog>
<script type="module">
const dialog = document.getElementById("confirm");
dialog.showModal();
dialog.addEventListener("close", () => console.log(dialog.returnValue)); // "delete" or "cancel"
</script>data-size="sm" or "lg" makes it narrower or wider.
Nothing yet
When there's nothing to show, say so plainly and offer the way forward.
No requests yet. They'll appear here as clients send them.
<div class="ts-empty">
<p>No requests yet. They'll appear here as clients send them.</p>
<button class="ts-button" type="button" data-variant="secondary">Add one yourself</button>
</div>Laying out a page
- Your page is the panel. Its background is
--color-canvas; don't draw a frame, a shadow or a title bar around it. The workspace already shows the tab's name above it. - Start with what's in view, not the tab's name again: a short title, and the main action on the right (
ts-header,ts-title). Pad the page by 24 px, or 16 px on a phone (ts-page). - Fill the width with lists, boards and tables, but keep reading text to about 46rem.
- Design for any size, down to a phone's 390 px: rows stack, numbers wrap, nothing scrolls sideways.
- Group with space and hairlines before boxes. A card is for a group of settings or one object's details, not for every paragraph.
- A home page has no tab row around it. A welcome in
--text-3xland a few clear sections suit it.
<body>
<main class="ts-page">
<header class="ts-header">
<div>
<h1 class="ts-title">Requests</h1>
<p class="ts-muted">12 open in Client work</p>
</div>
<button class="ts-button" type="button">New request</button>
</header>
<!-- … -->
</main>
</body>Icons
The workspace draws its icons with Lucide (free, under the ISC licence): outlined, round-ended strokes 2 px wide, at 14 to 16 px beside text and 17 px in navigation, in currentColor so they take the text's colour. The ones it uses most come with the stylesheet, in icons.js (beside it, or @tabs-and-spaces/sdk/design/icons):
import { icon, renderIcons } from "./tands-design/icons.js";
button.innerHTML = `${icon("plus")} New request`;
renderIcons(); // draws every <span data-icon="plus"></span> on the pageAn icon sits beside a word; on its own it's a ts-icon-button with a name (aria-label) and a tooltip (title), or icon(name, { label }). No filled, coloured or emoji icons. For one that isn't there, use Lucide's own, drawn the same way.
Words
How the workspace speaks matters as much as how it looks:
- Plain and short. Saved., Couldn't save. Try again., No requests yet.
- Sentence case, and no full stop on a button or a title.
- Say what happened and what to do next. Never just Error, and never blame the reader.
- Name things as the workspace does: spaces, tabs, tasks, agents, members, guests.
- No exclamation marks, no emoji, no "Oops".
- In the reader's language.
tands.context.localesays which; format dates and numbers withIntlin it. The workspace's English is British: colour, organise, cancelled.
Accessibility
- Keep to the text tokens: they pass WCAG AA in both themes.
- Keep focus visible: the base styles draw
--color-focus-ringaround whatever has keyboard focus. Don't remove it. - Everything works with a keyboard: real
<button>s and<input>s, not clickable<div>s. - Every field has a label; every icon-only button a name.
- State is in words (a badge, a label), with colour only as a help.
- Motion respects the reader's setting; the stylesheet does that for its own.
Before you publish
- It looks right in light and in dark, and changes when the reader switches while it's open.
- It works at 390 px wide, with nothing scrolling sideways.
- Every colour is a token; there are no greys of your own.
- There's one main action in view, and it says what it does.
- It works with only a keyboard, with focus always visible.
- Empty, loading and error states say something useful.
- Its words are in the reader's language, in sentence case.