Skip to content

Autocomplete ​

Loading...

Autocomplete: a text input with a dropdown of selectable suggestions.

  • Tag: <flint-autocomplete>
  • Class: FlintAutocomplete

Import ​

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

Usage ​

html
<flint-autocomplete></flint-autocomplete>

Properties ​

PropertyAttributeTypeDefaultDescription
optionsoptionsAutocompleteOption[][]The list of selectable options.
freeSolofree-solobooleanfalseWhen true, allows arbitrary values that are not in the options list.
disableddisabledbooleanfalseWhether the autocomplete input is disabled.
valuevaluestring''The current selected value.
placeholderplaceholderstring''Placeholder text shown when the input is empty.

Events ​

EventDetailDescription
flint-autocomplete-change—Fired when the selected value changes.

CSS Custom Properties ​

PropertyDefault
--flint-autocomplete-dropdown-max-height250px
--flint-autocomplete-z-index10
--flint-autocomplete-option-padding10px 12px
--flint-font-family—
--flint-input-border-color—
--flint-input-border-radius—
--flint-text-color—
--flint-input-bg—
--flint-primary-color—
--flint-input-disabled-bg—
--flint-text-color-subtle—
--flint-surface-1—
--flint-hover-color—
--flint-text-color-muted—