Skip to content

Forms

Last updated: 2026-11-27T11:37:21-03:00 (UTC-3)

Fields, selects and text areas in the console: how they look in each theme, how they show focus and errors, and how a long filter form stays short. Part of the design system.

Part Token
Fill --color-surface: an opaque ground, so what is typed never competes with the glass behind it
Text --color-text (--color-text-high on some screens)
Border 1px --color-line-field: 3:1 against every ground a field sits on (the page, a panel, the field’s own fill), because a field and its panel have nearly the same background
Placeholder --color-text-faint, at full opacity
Radius --radius-field (16px)
Native controls (checkbox, radio, range) accent-color: var(--color-brand-strong)
Options of a select --color-text on --color-surface, an opaque ground
Font --font-body

The console’s browser tests pin the computed values in both themes:

Theme Fill Border Text
Dark rgb(12, 24, 35) --color-line-field rgb(244, 248, 251)
Light rgb(255, 255, 255) rgb(108, 131, 141) rgb(8, 23, 30)

Fields in filter forms, list toolbars, editors and the sign-in card are at least --size-tap-target (44px) tall, with 14px text. A search box or an input with an icon (.searchbox, .input-wrap) draws the border and fill on its wrapper, and the input inside stays bare.

Every field starts from one base rule in web/src/theme.css: the fill, the text color, the border, 40px of height, the padding and a width that never exceeds its container. The rule has no specificity (:where()), so a screen’s own rule always wins where it sets a size or a tighter padding; a field no screen rule reaches still is the design system’s field, never the browser’s gray one. A second rule then gives every field the same border color and radius. --color-field is not a field’s fill: it is the quiet fill of a panel nested in a panel (see Cards).

  • Every field has a visible label above it, tied with <label> (wrapping the field or with for), in --color-text-soft at 13px and medium weight. A placeholder is an example, never the label.
  • Help text sits under the field in --color-text-soft; units and bounds go there (“1–100,000,000 tokens; empty keeps the target unchanged”).
  • Group related fields in a grid inside a panel; one column at phone width.

A filter form shows the filters most readers use and folds the rest. The request log is the model: six filters stay in view (time range, status, team, model, provider and request ID), and the others sit behind a More filters button beside the form’s actions.

  • The button is a secondary button with aria-expanded; open, it reads “Fewer filters”.
  • Sorting and its order count as folded filters, with the rest.
  • While folded, the button says how many folded filters are set (“More filters · 2 active”).
  • The section opens by itself whenever a folded filter is applied, when the page loads or later (a link from another screen, a click on a session in the table), so no filter narrows the list out of sight. Otherwise the console remembers whether the reader left it open.
  • Folded fields stay in the form, so a value typed before folding is kept.

Every field shows a 2px --color-primary outline, offset 2px, on keyboard focus (:focus-visible). Do not remove the outline; if a component must, it uses --shadow-focus instead.

  • Validate on submit and when the reader leaves a field, not on every keystroke.
  • Mark the field with aria-invalid="true" and tie the message to it with aria-describedby.
  • An invalid field takes a --color-danger border in place of the field border.
  • The message says what to do, in the reader’s terms (“Enter a whole number between 0 and 100”), in --color-danger-text under the field.
  • Errors that concern the whole form appear above the actions, and the server’s error message is shown as returned, without secrets.

See Error states for page-level failures.

<label class="release-field">
Max input tokens
<input type="number" min="1" max="100000000" placeholder="128000" aria-describedby="max-input-help" />
<small id="max-input-help">1–100,000,000. Empty keeps the target unchanged.</small>
</label>
.release-field input {
min-height: var(--size-tap-target);
background: var(--color-surface);
border: 1px solid var(--color-line-field);
border-radius: var(--radius-field);
color: var(--color-text);
font-family: var(--font-body);
}
.release-field input::placeholder {
color: var(--color-text-faint);
opacity: 1;
}
.release-field small {
color: var(--color-text-soft);
}
.release-field input[aria-invalid="true"] {
border-color: var(--color-danger);
}
  • The design-token check verifies line-field at 3:1 against the page, a panel and surface, and text, text-soft and text-faint at 4.5:1 on surface, in both themes.
  • The console’s browser tests measure placeholder and table header contrast in the rendered page, compare the computed field fill, border and text with the values above in each theme, and check that the request log shows six filters with the rest behind More filters.

m7gtw[email protected]