Tray UI
A design system for products and the pages around them, in plain HTML and CSS, with one small script for behaviour.

It is a white page, ink type in Onest, and goods set out in soft grey trays with very round corners. One yellow marks the thing to do. Nothing is outlined or shadowed: surfaces are told apart by flat fills alone.
- 108 components, from a button to a data table: forms, navigation, overlays, data, conversation, and media (a lightbox, a video player). They also cover the frame of a product: app shell, billing, account, onboarding and public pages.
- 64 blocks: whole screens to copy, from a dashboard and settings to a shop, a checkout, articles, a blog and a wiki, plus fifteen sidebars and sign-in pages.
- 10 templates: whole pages of a product with realistic content, from a landing page and pricing to a dashboard, orders, an inbox, settings, billing and a first-run wizard.
- 10 themes, six light and four dark, each measured against the system's 32 contrast rules, which pair a colour with each ground it is read on: 66 pairs. A theme maker derives your own from four colours.
- Accessibility built in. Keyboard support and accessible names follow the accessibility guide, and the system answers more contrast, forced colours, print and reduced motion.
- Icons from Lucide: 118 built into the script, and in React any other from
react-icons/lu.
- React, as
trayui-react: the same components, typed, over the same stylesheet. Its charts are drawn with Recharts, with 58 examples.
- Tailwind and Figma: the tokens as a Tailwind 4 theme, a Tailwind 3 preset and Figma variables with a mode for each theme.
- Three files, about 88 KB with gzip. No framework, no build step.
Install
Link the three files, in this order:
<!doctype html>
<html lang="en" data-theme="light">
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/tokens.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/components/bundle.css">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/components/bundle.js" defer></script>
</head>
With a bundler, install them from npm (npm install trayui) and import trayui/tokens.css, trayui/components/bundle.css and trayui/components/bundle.js. You can also copy the system/dist folder into your project and link the same files from there. The folder also holds the font, the blocks, the templates and the tokens for Tailwind and Figma. The Installation page has the same folder as a zip.
Write a first screen
<main class="tray-container tray-section">
<div class="tray-card tray-stack">
<h1 class="title">Order a jar</h1>
<div class="tray-field">
<label class="tray-label" for="address">Delivery address</label>
<input class="tray-input" id="address" autocomplete="street-address">
</div>
<button class="tray-btn" type="submit">Order a jar</button>
</div>
</main>
That is a grey tray on the white page, a white field in it, and the one yellow button. Components that need a script take data-tray, as in <div data-tray="tabs">, and wire themselves. If you add markup after the page has loaded, call TrayUI.init(root) on it.
The files in system/dist/blocks/ and system/dist/templates/ open as they are: start a screen from the nearest block, or a whole page from a template.
Add with the CLI
npx trayui init # the three files and the font, in trayui/
npx trayui add login-01 # a block beside your pages, its links pointed at trayui/
npx trayui diff # what you changed, and what a new release changed
npx trayui check page.html # the markup checked against the system's rules
npx trayui kit <name> # a paid kit from trayui.com/kits, with your licence key in TRAYUI_KEY
In a React app (Vite, Next.js) the same commands copy the source of components and blocks into src/components/trayui/, as files you own: npx trayui add button tabs login-01. npx trayui update brings them to a new release and keeps every file you changed. The items are also a registry in shadcn's format, so npx shadcn add https://trayui.com/r/login-01.json works too. It needs Node 18 or later and nothing else; the CLI page lists the commands. Its source is system/cli.
React
import { Button, Card, Field, Input } from 'trayui-react';
import 'trayui-react/styles.css';