Text field
States in light and dark
Each panel sets its own theme scope, so the appearance control above does not change them. The two lower panels nest the opposite theme inside. Hover a field, press Tab to focus it, and read the ring.
Light theme
Dark theme
Dark theme, with a light panel inside
Light theme, nested in dark
Light theme, with a dark panel inside
Dark theme, nested in light
Sizes, gutters and pill
Heights are 22, 24, 26, 28, 32, 36, 40, 44 and 48px. The gutter size changes only the horizontal padding. Pill rounds the container and grows the gutter by 1.33.
Container press, focus and select
Press the container beside the text and the input takes focus with the caret at the start or the end. Double-click beside the text selects the nearest word, triple-click selects all. The button inside the container keeps its own press.
events: none
Other props
Optical alignment pulls the container outward by one gutter. Autofill extensions stay active when asked for. The field variant hides the number spin buttons. The focus ring can be turned off.
Textarea
Rows sets the minimum height. Auto resize grows the box with the text up to max rows, then scrolls. Resize shows the corner handle.
Tag input
Press Backspace or ArrowLeft with the caret at the start to move to the last tag. In a tag, ArrowLeft and ArrowRight move between tags, Backspace and Delete remove one. Enter in the field adds the text as a tag.
tags: Alpha, Beta, Gamma
Phone input
Type digits to see the national format and the E.164 value. Open the country button, type to search by name, code or dial code, move with the arrow keys and press Enter. Typing a plus sign and a calling code picks the country.
TextInput variants
Every TextInput variant with its classes. Four variants (default, field, segmented and form) are also shown with a leading control, a value suffix and a trailing control.
TextareaField variants
Every TextareaField variant. Auto resize and the display fit run on input. The feedback variant takes a footer and the segmented variant takes a trailing control.
Footer text
Inline error text
The error is a plain element with role alert that exists only while the value is too long. It is announced when it appears.
Project name cannot be longer than 20 characters
Ref cleanup
The callback ref returns a cleanup. Hiding the field runs that cleanup once, not a call with null.
ref events: