Light themes
Dark themes

Make your own

108 components in plain HTML and CSS

Tray UI is a design system for products and the pages around them: a white page, ink type, grey trays and one yellow. Three files, no framework, no build step.

81 KB compressed, MIT licence, built to WCAG 2.2 AA. 10 themes, or one of your own. Building with an AI tool? Give it llms.txt.

Three files

Version 0.2.0
HTML
<link rel="stylesheet"
  href="https://trayui.com/tokens.css">
<link rel="stylesheet"
  href="https://trayui.com/components/bundle.css">
<script defer
  src="https://trayui.com/components/bundle.js"></script>
  • tokens.cssEvery colour, size and type style1 KB
  • components/bundle.cssThe classes of every component36 KB
  • components/bundle.jsBehaviour and the icons42 KB

Link them as above, or download them, and write HTML. A button is one class; a menu, a calendar or a chart is one attribute more.

From a button to a data table

Forms, navigation, overlays, data and conversation: 108 components that keep one set of rules. Everything on this page is the real thing, so try it.

Order a jar

Jar size
Jars
2

The courier calls ten minutes before arriving.

Caviar collected by month
Is the autumn batch still open?
Yes, 132 jars are left. Choose the day and we pack it that morning.

To pack today

  • PL-20431Dana Kovalenko, four jarsTo pack
  • PL-20418Ivan Petrenko, three jarsWith the courier
  • PL-20362Viktor Marchenko, one jarDelivered

Browse all 108 components

64 blocks

Whole screens built only from the components: a dashboard, a shop, an article, a wiki, fifteen sidebars, sign-in pages. Copy one and replace its content.

58 charts, drawn with Recharts

In React, a chart is a Recharts chart in the frame of this system: thin marks, ink for one series, the data colours for several, and the same figures as a table. Copy one and replace its data.

Browse all 58 charts

Four rules do most of the work

The components look alike because they obey the same few rules, not because they share decoration. The brand book has the rest.

Depth is fill

White page, grey tray, white field. A surface tells its children what they sit on, so nothing needs an outline or a shadow.

One yellow

Yellow marks the single most important thing to do in view. Everything else is quiet, ghost or a link.

Selected is solid ink

The current tab, the chosen segment, a checked box, a switch that is on. Yellow never means selected.

10 themes, each chosen

Every theme has its own values, picked against its own page, and an accent of its own. Try them in the menu at the top, or make one of your own.

38orders

To pack

38orders

To pack

118 icons built in, 1,500 more beside them

The icons are Lucide's: a round stroke in the colour of the text beside them. These come with the script; any other Lucide icon fits, and in React it comes from react-icons.

See every icon

It reads like HTML because it is

Classes on the elements the browser already has. The same components come typed for React.

<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">
  </div>
  <button class="tray-btn" type="submit">Order a jar</button>
</div>

Order a jar

Start with three files

Download them, link them, and copy your first screen from a block.

↑↓ to moveEnter to openEsc to close