Shared components and visual design
The two shared components in ui.contract, the exact:content parts in use, the design principles and tokens, and the accessibility and testId conventions.

Seed Exact paints very little itself. Bars, lists, controls, type sizes and dark mode come from the platform through Exact. The shared visual layer is two components in ui.contract, seven tokens in app.tamber, and the written rules in DESIGN.md.

ui.contract

The file is lead-owned ("Ask the lead (RESULT.md) for changes").

Component

Props

What it draws

Avatar

name, url, size

A round image when url is set. Otherwise a disc with the first letter of name in white (? when empty)

StatusLine

message, retry

A footnote message with a Retry button, testId="retry". The inline failure line

The image-less avatar colour is hsl(avatarHue(name), 54%, 32%), with avatarHue (one line in the source, wrapped here):

fn avatarHue(name: string): number = 127 + sum(name.toLowerCase().split("").map((c, i) => ("abcdefghijklmnopqrstuvwxyz0123456789".indexOf(c) + 2) * (i + 7))) % 49

The result is a hue from 127 to 175: "the green family around desktop's identicon hue (151 ± 24)", stable per name so an author keeps the same disc. The initial uses -exact-title2 capped at 24px when size >= 48, else -exact-footnote capped at 12px, so the circle keeps its size at every Dynamic Type setting. The font-size values are literals because "a computed one reaches the web's CSS with the role unresolved".

Avatar is drawn by read, discuss, activity, agents and me (vault imports it without calling it). StatusLine is drawn by read and discuss.

Parts from exact:content

Only two framework parts are imported:

Part

Used in

For

EmptyState

activity.contract, agents.contract (me.contract imports it without calling it)

A whole-screen empty state with symbol, title and message

Badge

agents.contract

The run status pill, tinted brand.fill or danger.fill

DESIGN.md also lists DocRow and CommentBubble as shared components. They do not exist in ui.contract: read and discuss define their own rows (DocItemRow, DiscussBubble).

Design principles

From DESIGN.md:

    Leave it unsaid. Paint only content: document typography, comment bubbles, avatars.

    Reading first. A calm column, max-width="40rem", no chrome in the content.

    One tap to anywhere in the space. The directory sheet is always in the nav bar.

    Honest state. Every resource has a loading placeholder, a failure line with Retry, and an empty state that names the next step.

    Sentence case, no ids. Never show z6Mk... as a primary label.

The broader visual design is in the Design document.

Tokens

app.tamber defines only the brand. Everything else is a platform role such as -exact-label or -exact-secondary-background. See Tamber design tokens for the format.

Token

Light

Dark

Use

AccentColor, brand

#007a70

#26a596

The tint: tab selection, links, symbols, buttons

brand.fill

#007a70

#147a71

Surface under white body text: my chat bubbles, badges. Paired with ink.on-brand

brand.subtle

#e3f4f2

#0f2e2b

Selected rows, embed card edge

danger.fill

#b42318

#c4281c

A failed badge under white text

ink.on-brand

#ffffff

fixed

Text on brand fills

type.reading

-exact-body/1.4


Document paragraphs

type.code

-exact-footnote/1.4 ui-monospace, Menlo, monospace


Code blocks

Spacing, radius and size rules

From DESIGN.md:

    Type: platform text styles only, plus the two type tokens.

    Spacing: 4, 8, 12, 16, 20, 24.

    Radii: 10 for cards, images and code, 18 for bubbles, full for avatars.

    Avatars: 28 in rows and inline, 56 in headers.

    An empty state inside a grouped list is a row (headline plus a secondary sentence) followed by action rows. A whole-screen empty state is EmptyState.

    No colour literals in screens. Exact's no-tells and lower-colour-one-scheme checks flag them. The avatar's computed hsl() is the one exception in shared code.

Accessibility conventions

    Screen titles are text ... role="heading" with aria-level=1 on tab roots and aria-level=2 on pushed screens.

    The tab bar is a row role="tablist" of button role="tab" with aria-controls="panel-<tab>" and aria-selected; each panel is a column role="tabpanel" id="panel-<tab>" (lines 930-942).

    Icon-only buttons carry aria-label (for example aria-label="New agent"). Single-choice rows use role="radio" with aria-checked. Disclosure buttons use aria-expanded.

    Avatar sets aria-label=name on the disc and aria-hidden=true on the initial.

    Touch targets in custom rows use min-height=44.

TestIds

Contract tests find nodes by testId. Because every stacked screen stays mounted (see Navigation), a plain id could match a covered screen. Read and discuss solve this with a helper: tid(active, name) in read.contract and the identical dtid in discuss.contract return name only when the screen is the visible one, else "". Other packages use ids that are unique by construction: a package prefix (agents-, me-, activity-) and often the row's id (agent-<id>, session-<id>).

Do you like what you are reading? Subscribe to receive updates.

Unsubscribe anytime

Connections0
Linked document · Outgoing linkLinked documentLinked document · Outgoing linkLinked documentLinked document · Outgoing linkLinked documentLinked document · Outgoing linkLinked documentLinked document · Outgoing linkLinked documentLinked document · Outgoing linkLinked documentLinked document · Outgoing linkLinked documentLinked document · Outgoing linkLinked documentLinked document · Outgoing linkLinked documentLinked document · Outgoing linkLinked documentShared components and visual designShared components and vis…
Citations 0Children & links 10

Loading child documents…

Connections show where other documents or comments link to this document.

Related documents

Loading connections…