Text Field
Live preview and documentation for the Text Field component.
About
The design system's text input field (single or multi-line), with form validation, prefix/suffix icons, and a stable height.
variant:primary(default, filled + border + shadow),secondary(elevated background, no shadow),flat(flat border, no shadow, ideal for auth screens),tonal(surfaceSecondarybackground, no border), orembedded(transparent, no border/shadow — used insideTextFieldGroup)size:medium(default, 45px, 16px text; use for forms, especially on phones) orsmall(40px, 14px text; for dense desktop areas like sidebars and panels, matching the smallKasyButton). The placeholder always matches the text sizecontentType:text(default),email,password(adds a show/hide toggle), orphone(numeric keyboard + digit formatter)label/showRequiredIndicator: field label and optional red asteriskdescription/errorText/isInvalid: help text and error stateprefix/suffix: widgets on the sides (icons, buttons)maxLength: shows a character countermaxLines/minLines: single-line field (default) or multi-lineenabled/readOnly/autofocus/obscureText: standard statesvalidator/onSaved/onChanged/onSubmitted: form integrationfocusBorder/forceFocusBorder: controls whether the focus (accent) border appears;forceFocusBorderpaints the field as "active" without it actually being focused (used by composite triggers likeDatePicker)
Single-line height is fixed at 45px (singleLineHeight), matching the medium KasyButton, to keep visual consistency between fields and buttons.
Preview
Loading the component…
Last updated on 11/03/2026

