Skip to content

Text Field ​

States

Loading...

Text Field: a styled text input with outlined/filled variants.

  • Tag: <flint-text-field>
  • Class: FlintTextField

Import ​

ts
import 'flint-ui'; // auto-registers all
// or
import { FlintTextField } from 'flint-ui';

Usage ​

html
<flint-text-field></flint-text-field>

Properties ​

PropertyAttributeTypeDefaultDescription
labellabelstring''Label text displayed above the input.
valuevaluestring''Current value of the text field.
placeholderplaceholderstring''Placeholder text shown when the input is empty.
typetypestring'text'HTML input type (e.g. 'text', 'password', 'email').
variantvariant'outlined' | 'filled''outlined'Visual style variant of the text field.
disableddisabledbooleanfalseWhether the text field is disabled.
errorerrorbooleanfalseWhether the text field is in an error state.
helperTexthelper-textstring''Helper text displayed below the input.
errorMessageerror-messagestring''Error message displayed below the input when in error state.

Events ​

EventDetailDescription
input—Fired on each keystroke as the value changes.
change—Fired when the input loses focus after the value has changed.

Slots ​

NameDescription
leading
trailing

CSS Custom Properties ​

PropertyDefault
--flint-font-family—
--flint-label-color—
--flint-input-bg—
--flint-input-border-color—
--flint-input-border-radius—
--flint-input-border-hover-color—
--flint-primary-color—
--flint-primary-focus-ring—
--flint-error-color—
--flint-error-focus-ring—
--flint-input-disabled-bg—
--flint-input-placeholder-color—
--flint-text-color-muted—
--flint-help-text-color—
--flint-surface-2—
--flint-hover-color—