Components

← All components

TextInput

src/lib/components/text-input.tsx·size (sm · md · lg) · disabled · readOnly · invalid · prefix / suffix · verified · numeric · type · value | placeholder

Guide

tentative
  • A typed value in the grey field box: lg for configuration forms, sm for notification settings; numeric for numbers.
  • Foreground text only for a value the user typed; placeholders stay muted, so an empty field never reads as filled.
  • Keep the value when invalid — never clear it.
  • Give a number its unit (“tokens”, “examples”) — the spec asks to show units.
  • When disabled, show what enables it beside the field — never only through the placeholder (PRD 01).
  • Don't type the unit into the value or the placeholder.

Related: Field, Select, ComboboxSources: src/lib/components/text-input.tsx · docs/decisions/0001-component-contracts.md · docs/product/prd-01-inference-custom-configuration.md

size=sm empty

size=sm placeholder

size=sm filled

size=sm invalid (value kept)

size=sm disabled

size=sm readOnly

size=md empty

size=md placeholder

size=md filled

size=md invalid (value kept)

size=md disabled

size=md readOnly

size=lg empty

size=lg placeholder

size=lg filled

size=lg invalid (value kept)

size=lg disabled

size=lg readOnly

size=lg numeric + suffix

size=lg numeric + suffix, placeholder

size=lg prefix, type=url

size=md suffix invalid

size=sm verified, type=email

size=sm unverified, type=tel