Skip to main content
Context GrammarContext-aware AI

Text field

A square input with a spark border and ring on focus. A hint says what it takes; an error says what to do, in words as well as the red border.

Email
Only used for the newsletter.

Controls

Code

import { Field, TextField } from "@/components/ui/kit/forms";

<Field label="Email" hint="Only used for the newsletter.">
  <TextField placeholder="name@example.com" />
</Field>

Every state

Field · Default

Email
Only used for the newsletter.

TextField · Error

Email
Add a domain, like name@example.com.

TextField · Disabled

TextField caret

›

Usage

Do

  • Always give the field a visible label; the placeholder is only an example.
  • Say how to fix an error, not only that something is wrong.

Don’t

  • Don’t validate while someone is still typing.

Tokens it uses

Tokens it uses
--paper…
--line-control…
--spark…
--spark-ink…
--ink…
--faint…
--font-body…
--font-label…

Values are read live from the stylesheet, so they follow the site theme.

Spec

Trigger
Focus
Reduced motion
The border colour changes at once.

Used in