Skip to content

Input ​

Types

Loading...

States

Loading...

Sizes

Loading...

Input: a styled text input with label, help text, and error states.

  • Tag: <flint-input>
  • Class: FlintInput

Import ​

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

Usage ​

html
<flint-input></flint-input>

Properties ​

PropertyAttributeTypeDefaultDescription
labellabelstring''Label text displayed above the input.
valuevaluestring''Current input value.
typetypestring'text'HTML input type (text, email, password, etc.).
placeholderplaceholderstring''Placeholder text shown when the input is empty.
helpTexthelp-textstring''Help text displayed below the input.
errorerrorbooleanfalseWhether the input is in an error state.
errorMessageerror-messagestring''Error message displayed below the input.
disableddisabledbooleanfalseDisables the input and prevents interaction.
requiredrequiredbooleanfalseMarks the input as required for form validation.
readonlyreadonlybooleanfalseMakes the input read-only.
namenamestring''Form field name used when submitting form data.
autocompleteautocompletestring''Browser autocomplete hint.
sizesize'sm' | 'default' | 'lg''default''sm' | 'default' | 'lg'

Events ​

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

CSS Custom Properties ​

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

Methods ​

MethodDescription
inputElement(): HTMLInputElementExpose the internal <input> for direct access