Skip to content
oxidaseSign in

Content

Text, layout, the one card, rows, records and the small parts that hold a page together.

Text

Text sets semantics and look separately: as picks the element for the document outline, variant picks the type style. Tones are ink, secondary, tertiary, blue for data and the status inks.

Where you stand

The latest observed reading for each faculty, with its unit.

Updated after 14 sessions

Code
<Text as="h3" variant="section">Where you stand</Text>
<Text tone="secondary">
  The latest observed reading for each faculty, with its unit.
</Text>
<Text variant="meta" tone="tertiary">Updated after 14 sessions</Text>

Layout

Stack flows children vertically with a spacing step between them. Cluster is a row that wraps rather than hiding what does not fit. Container centers a measured column, and with measure="page" gutter="page" it is the 1280px page wrap. Divider draws a hairline between related groups.


Content below a hairline belongs to the same card but a different group.

Code
<Stack gap="s16">
  <Cluster gap="s8">
    <Button size="small">Today</Button>
    <Button size="small">This week</Button>
    <Button size="small">All time</Button>
  </Cluster>
  <Divider />
  <Text tone="secondary">
    Content below a hairline belongs to the same card but a different group.
  </Text>
</Stack>

Cards and page headers

Surface is the one card: surface, a hairline edge, 18px corners and the one card padding. Cards sit on the canvas, never inside another card; group inside a card with space or a rule. SurfaceLink is a card that goes somewhere, and lifts under a pointer. PageHeader gives a page its one h1, a description only when it adds something, a way back and actions beside the title.

Session of 8 November

Code
<PageHeader
  title="Session of 8 November"
  titleAs="h3"
  back={<TextLink href="/design/components/content" component={i}>Journal</TextLink>}
  actions={<Button>Export</Button>}
/>

Spatial hold

Six trials, about four minutes

Machine

Opens the protocol

Code
<Stack gap="s12">
  <Surface>
    <Text variant="title">Spatial hold</Text>
    <Text variant="small" tone="secondary">
      Six trials, about four minutes
    </Text>
  </Surface>
  <SurfaceLink href="/design/components/content#surfaces" component={i}>
    <Text variant="title">Machine</Text>
    <Text variant="small" tone="secondary">Opens the protocol</Text>
  </SurfaceLink>
</Stack>

Rows

Settings and records are one card of rows divided by rules. A ListRow with href is one link for the whole row. Actions inside a row name the row: "Revoke Chrome on Android", not "Revoke".

Signed-in devices

Code
<RowGroup title="Signed-in devices" titleAs="h3">
  <ListRow
    leading={<Icon icon={Laptop} />}
    title="Safari on Mac"
    badge={<StatusBadge tone="indicator">This device</StatusBadge>}
    detail="Active now"
  />
  <ListRow
    leading={<Icon icon={Smartphone} />}
    title="Chrome on Android"
    detail="Last active 3 days ago"
    trailing={<Button size="small">Revoke Chrome on Android</Button>}
  />
  <ListRow
    title="Security history"
    detail="Sign-ins, password changes and new devices"
    href="/design/components/content"
    component={i}
  />
</RowGroup>
PropTypeDefaultDescription
titleReactNodeNoneThe row's name.
detailReactNodeNoneOne line of status or description.
leadingReactNodeNoneA decorative glyph or avatar, hidden from assistive technology.
badgeReactNodeNoneA StatusBadge beside the title.
trailingReactNodeNoneA control or value at the end of the row.
hrefstringNoneMakes the whole row one link, with a chevron.
componentElementType"a"The link element for href, such as next/link.

Records

Started
8 Nov, 09:14
Trials
6 of 6
Scoring version
spatial-hold 3
Display
Light, full motion

Latest session

41/52cells held

Observed, 6 trials

  • Spatial hold
  • 6 trials
  • 4 minutes
  • Unassisted
Code
<KeyValue
  columns={4}
  items={[{ label: "Started", value: "8 Nov, 09:14" }, { label: "Trials", value: "6 of 6" }, { label: "Scoring version", value: "spatial-hold 3" }, { label: "Display", value: "Light, full motion" }]}
/>
<MetricTile
  value="41/52"
  unit="cells held"
  label="Latest session"
  provenance="Observed, 6 trials"
/>
<MetaList
  label="Session"
  items={["Spatial hold", "6 trials", "4 minutes", "Unassisted"]}
/>

Labels use the meta style and values read as text. MetaList separates facts with hairlines in the gap, not punctuation characters, and the separators disappear at the start of a wrapped line.

Status

A short state in words: a pill tag in the meta style. The words carry the meaning; tone only supports them. earned is the yellow tag, for XP the server has awarded.

DraftScoredNeeds reviewFailed+5 XP
Code
<StatusBadge>Draft</StatusBadge>
<StatusBadge tone="indicator">Scored</StatusBadge>
<StatusBadge tone="warning">Needs review</StatusBadge>
<StatusBadge tone="danger">Failed</StatusBadge>
<StatusBadge tone="earned">+5 XP</StatusBadge>

Timelines and steps

  1. Reply sentToday, 10:42

    Explained how hold time is counted.
  2. Internal noteToday, 10:15

    Reproduced on a second account.
  3. Ticket openedYesterday, 18:03

Code
<Timeline
  label="Ticket history"
  items={[{ id: "3", title: "Reply sent", time: "Today, 10:42", detail: "Explained how hold time is counted." }, { id: "2", title: "Internal note", time: "Today, 10:15", detail: "Reproduced on a second account." }, { id: "1", title: "Ticket opened", time: "Yesterday, 18:03", tone: "indicator" }]}
/>
  1. Scan the code (done)
  2. Enter a code
  3. Save backup codes
Code
<StepList
  label="Set up an authenticator"
  current={1}
  steps={["Scan the code", "Enter a code", "Save backup codes"]}
/>

Disclosure

Native details and summary, with a chevron that turns. It holds optional depth so a page can lead with its summary; never put a required step behind it.

Why this session has no forecast

No forecast was frozen before this session started, so there is nothing to compare its result against.

Code
<Disclosure summary="Why this session has no forecast">
  <Text tone="secondary">
    No forecast was frozen before this session started, so there is nothing to compare its result against.
  </Text>
</Disclosure>

People and keys

Search with /

Code
<Avatar name="Ada Lovelace" />
<Avatar name="Grace Hopper" size="large" />
<Text variant="small" tone="secondary">
  Search with
  <Kbd>/</Kbd>
</Text>
  • Avatars are ink initials or a photo the person chose. They are named unless the name is printed beside them; then pass decorative.
  • Keyboard hints show only shortcuts that exist.