KasyKasy

Text Field

Live preview and documentation for the Text Field component.

Preview

componentPreview.loading

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 (surfaceSecondary background, no border), or embedded (transparent, no border/shadow — used inside TextFieldGroup)
  • contentType: text (default), email, password (adds a show/hide toggle), or phone (numeric keyboard + digit formatter)
  • label / showRequiredIndicator: field label and optional red asterisk
  • description / errorText / isInvalid: help text and error state
  • prefix / suffix: widgets on the sides (icons, buttons)
  • maxLength: shows a character counter
  • maxLines / minLines: single-line field (default) or multi-line
  • enabled / readOnly / autofocus / obscureText: standard states
  • validator / onSaved / onChanged / onSubmitted: form integration
  • focusBorder / forceFocusBorder: controls whether the focus (accent) border appears; forceFocusBorder paints the field as "active" without it actually being focused (used by composite triggers like DatePicker)

Single-line height is fixed at 45px (singleLineHeight), matching the medium KasyButton, to keep visual consistency between fields and buttons.

Last updated on 08/23/2026

On this page