Tokens · Page
Black on white; the greys for what steps back.
--boxy-bgThe page--boxy-fgThe text--boxy-mutedLabels, captions, empty messages--boxy-ghostFaded headline words--boxy-lineThe lines that divide the page
Install it from npm:
npm install boxykit
Import the CSS once, at the root of the app, and use anything on this page:
import "boxykit/css";
import { Button } from "boxykit/react";
<Button>Save</Button>No React? Pick CSS at the side.
No npm either? Download the whole kit as one file and link it, or copy it into your own:
<link rel="stylesheet" href="boxykit-0.4.0.css">
Black on white; the greys for what steps back.
--boxy-bgThe page--boxy-fgThe text--boxy-mutedLabels, captions, empty messages--boxy-ghostFaded headline words--boxy-lineThe lines that divide the pageThe yellow: the main action, the current page, what is chosen. Text on it is --boxy-on-accent.
--boxy-accentThe yellow--boxy-accent-strongAn accent button under the pointer--boxy-accent-softSelection, what is under the pointer--boxy-on-accentText on the yellowThe inverted bands: the nav, dark tiles and buttons, toasts.
--boxy-band-bgThe band--boxy-band-fgText on it--boxy-band-mutedThe nav numbers, toast titles--boxy-band-lineLines on the band--boxy-band-hoverA band link under the pointerThe tones of alerts; each -soft one is its background.
--boxy-infoInformation--boxy-successRight, saved--boxy-warningClose, careful--boxy-dangerWrong, errors--boxy-danger-softBehind an errorEach size is --boxy-font-scale (1.5) times the one below it; tiny is the odd one, for the small numbers. Each has its --boxy-line-height-…, a whole number of spaces.
--boxy-font-size-tinyTile numbers 01/04--boxy-font-size-smallLabels, buttons, tables, captions--boxy-font-sizeBody text--boxy-font-size-headingTile values--boxy-font-size-displaySection headings--boxy-font-size-headlineHeadlines--boxy-font-size-heroThe hero numberMultiples of --boxy-space (0.25rem).
--boxy-space--boxy-space-2--boxy-space-3--boxy-space-4--boxy-space-6--boxy-space-8--boxy-space-12--boxy-space-24Big capitals, set tight. ghost adds words set back in grey.
The biggest size in the regular weight, its unit at the heading size: the one number a screen is about.
62%
Small grey capitals spaced wide, for what a block is; mono for IDs, dates and counts.
Progress
TSK-0784 · 2026-10-05A small square in front of each item, in the middle of its height.
NumberedList: 01, 02… from a CSS counter, in the middle of the item.
Small rectangles: outlined, or look accent or dark for the ones that matter. title shows on hover; icon goes before the label.
The kit ships no icons: give any line icon (here Lucide) boxy-icon. large doubles it, for empty states and tiles.
As big as the text around it and in its color; square line ends, to go with the rectangles.
Synced two minutes ago
Due Friday
Hidden from screen readers by default; one that says something the words don't gets role="img" and aria-label.
Billing
Four cells, the left column twice as wide: the content on the left, its status and actions on the right.
Sprint 14
Next
even makes the columns as wide as each other: four cells are four quarters.
62%
Done
23%
In progress
11%
To do
4%
Blocked
Two cells in an even board: the screen split in two.
Two halves: put two cells in an even board.
tall takes the whole left column; end puts a cell's content on the line below it.
TSK-0412
Step 2 of 4
fit makes rows as tall as their content. A side cell sits in the right column even when it comes first; sticky keeps its content in view. Right under a Nav the board is shorter by the Nav's height.
Inputs
Net, a month
Breakdown
Children one under another, --boxy-space-4 between them.
Sprint 14
gap names another spacing step: 2, 3, 6 or 8. Stacks nest: a wide gap between groups, a narrow one inside them.
Gap 2
TSK-0410TSK-0411Gap 3
TSK-0412TSK-0413Gap 6
TSK-0414TSK-0415A rounded outline around any content: the cards of an invoice, a summary.
From
Northwind Oy
Helsinki
Bill to
Mia Laine
Tampere
A SectionHeading and the content under it.
The content under the heading.
Columns with a header each.
| Task | Owner | Status |
|---|---|---|
| Fix the login form | Mia | In review |
| Export to CSV | Leo | In progress |
| Dark mode | Ana | Done |
onRowClick makes rows clickable (Enter and Space too); expanded draws a full-width row under an open one.
| Task | Owner |
|---|---|
| Fix the login form | Mia |
| Safari drops the password on submit. | |
| Export to CSV | Leo |
numeric on a column puts it on the right, digits as wide as each other, on one line. foot is the rows of totals, under a dark line.
| Item | Hours | Amount |
|---|---|---|
| Design | 12,5 | 1 000,00 € |
| Development | 40 | 3 600,00 € |
| Review | 3 | 270,00 € |
| Total | 55,5 | 4 870,00 € |
The row form of a LabelTile, a <dl>: the label small and mono on the left, the value on the right. accent fills the row that sums up.
Outlined: the place 04/04 at the top, the value and its label at the bottom.
look fills the tile with the accent (the first or the main number) or dark (the others).
A ring at the top right shows a share: shareRing(part, whole, of) makes it with its title.
wide makes the tile two squares wide and as tall as one: the tile that leads a row.
outOf adds the whole, small after the value: 3/10.
corner puts a text such as a date where the place goes; icon puts an icon where a ring goes.
A tile whose label says it all has no value.
With onClick the whole tile is a button and its label ends in →; disabled fades it.
Tiles that work like radio buttons: the chosen one accent, the others dark. children adds tiles after them.
A place in small mono numbers, 01/04; without of just 01. The tiles draw it themselves.
An outlined square, the label small at the top and the value at the bottom.
The square keeps its size: lines break between words, evenly.
wide makes it two squares wide and at least as tall as one, for values longer than a word.
An empty field or list: a dashed outline and a faded value.
The label can hold more than text: here a ProgressRing next to it.
Outlined, as wide as its container.
No line, a light fill: for filters and search in toolbars. Field puts a label over any control; icon goes inside on the left.
invalid sets aria-invalid, which the CSS marks.
size="small" and "tiny": the small text in less padding, for toolbars and table rows. An icon follows the size.
A group of Fields, one under another.
layout="columns": two across from sm, one under another below it. full on a Field takes both.
layout="row": side by side on one line, the controls and a button on one bottom line; they wrap when the line is short.
layout="aside": from sm the labels in a column as wide as the longest, the controls lined up in a second one.
The Input's look over several lines; it grows taller by hand. invalid works as on Input.
The native select in the Input's look. Where the browser allows (Chrome), the open list is styled too.
size="small" and "tiny", as on Input.
A field that opens a rounded box: a search on top, the options under it split by lines. Arrows move, Enter picks, Esc closes.
Nothing found
numbered puts 01, 02… before the options, and each keeps its number while searching. ring on an option adds a ProgressRing.
Nothing found
search={false} for a short list; icon on an option shows in the box and in the field. name adds a hidden input, so it goes with a form.
Nothing found
Rows like an InteractiveList, in a ChoiceList: the square fills when on; indeterminate half-fills it.
One name for one question; the circle fills. numbered puts 01, 02… in front.
On or off at once, no Save: YES ■ | □ NO at the end of the row, the side it is on in the accent.
A slider under the field: drag the small square along the line, min and max at its ends. Type, or step with the arrow keys; it stays inside.
from and to only set the line's ends: the slider runs over them, nothing shows at the ends, and a typed number can go past.
No range, no slider. step holds everywhere: typing snaps to it when you leave the field, and the arrow keys move by it.
unit shows small at the right end of the field: €, %, kg. It stays out of the label.
size="small" and "tiny", as on Input; the unit shrinks with them.
The chosen cell is the accent.
Filled clockwise to a 0–1 value; title says what it means.
size="large" for a ring that stands alone, e.g. in a table cell.
The ring with a quarter running round it: something is under way.
Dark like a Toast: a dot in the tone top right, an optional title in the tone on top. Danger and warning are announced right away (role="alert"), the others politely.
look="light": the page's colors, outlined.
A dashed box, grey and centered, instead of an empty list or table.
No tasks yet.
The title small at the top, then the content. Show toast puts it in the corner for 3 seconds.
count goes at the right of the title.
A toast that waits for an answer (role="alertdialog"): it goes only when a button hides it.
The title small at the top, the content, the actions at the bottom. Esc, ✕ and a click on the dim close it.