Skip to the page
Supply UI

Item text

In code: ItemText

A name and a line under it: a person and their role, a product and its price. Tight, so the two read as one. size="lg" for the heading of a card: "Ines Duarte / Tutor".

Preview

Ines DuarteTutor · Maths and physics
Linen tote£24.00
Harbour RoomSeats 8 · £40 an hour

Use

The code of the preview above
import { ItemText, PatternAvatar, Row, Stack } from '@/components/ui';

<Stack gap={4}>
  <Row nowrap gap={3}>
    <PatternAvatar name="Ines Duarte" />
    <ItemText title="Ines Duarte" note="Tutor · Maths and physics" />
  </Row>
  <Row nowrap gap={3}>
    <PatternAvatar name="Linen tote" />
    <ItemText title="Linen tote" note={<span className="ui-mono">£24.00</span>} />
  </Row>
  <ItemText size="lg" title="Harbour Room" note="Seats 8 · £40 an hour" />
</Stack>

This page as text, for an AI

Options

OptionTypeWhat it does
title NeededReactNodeThe name: a person, a product.
note ReactNodeThe quieter line under it: a role, a price.
size "lg"Its size, one step from the theme's Size: sm, md (default) or lg.

It also takes the 279 attributes of the element or UI SDK part it draws: className, aria-label, events and the rest.

Without React

The same look on any HTML, with the classes span.ui-item-text > .ui-item-title + .ui-item-note; ui-item-text--lg.

In the examples

Small screens made with it and the rest of the kit. They work: click, type and choose in them.

Queued2
Flyers A5500 · gloss
Café menus40 · matte, folded
On the press2/3
Business cards250 · soft touch
Gig poster A260 · two colours
Ready to collect1
Jar labels1,200 · round
Jobs on the press Drag a job along. The press takes three at a time.
book.harbour.studioChecked every minuteUp
Two weeks99.79%
Answer212 ms
Last down9 Nov
Still up Two weeks of checks, the dips hatched
  • Noor Haddad#1187
  • Otis Brandt#1188
  • Yuki Tanabe#1189
Details from below An order rises as a drawer you can drag

Classes this week

  • Wheel throwingTue 18:002 spots
  • GlazingThu 18:305 spots
  • Hand buildingSat 10:00Full
Loading, politely Grey shapes hold the place until the classes arrive

Layout: states, do and don’t

A name and a line under it: a person and their role, a product and its price, a file and its size. Set tight so the two read as one; never build the pair from two loose lines of text. size="lg" for the heading of a card.

States. Layout follows the box it is in, not the window: Split, Grid, AppShell and the site parts stack when their box is narrow, at any width of the window.

Do

  • Space with gap (Stack, Row, Grid), never with margins on children.
  • Put the page's sections straight on the page, under their titles; a Card is one thing a person picks or acts on.
  • Check every screen at 320, 375 and 768 px with the narrow check of rule 10.

Don't

  • Don't give a box a fixed width, or a min-height together with an aspect-ratio.
  • Don't nest a card in a card.
  • Don't put two <main>s on a page: a screen shown inside another page takes Main as="div".