Skip to content

Combobox ​

Combobox: a free-text input with dropdown suggestions.

  • Tag: <flint-combobox>
  • Class: FlintCombobox

Import ​

ts
import '@getufy/flint-ui'; // auto-registers all
// or
import { FlintCombobox } from '@getufy/flint-ui';

Usage ​

html
<flint-combobox></flint-combobox>

Properties ​

PropertyAttributeTypeDefaultDescription
optionsoptionsComboboxOption[][]The list of suggestion options.
valuevaluestring''The current text value.
placeholderplaceholderstring''Placeholder text shown when the input is empty.
disableddisabledbooleanfalseWhether the combobox is disabled.
requiredrequiredbooleanfalseMarks the combobox as required for form validation.
namenamestring''Form field name used when submitting form data.
defaultValuedefault-valuestring''Initial value for uncontrolled usage.

Events ​

EventDetailDescription
flint-combobox-change&#123; value: string &#125;Fired when the value changes. detail: &#123; value: string &#125;

CSS Parts ​

NameDescription
baseThe wrapper element.
inputThe text input element.
listboxThe dropdown suggestions container.
optionAn individual suggestion element.

CSS Custom Properties ​

PropertyDefault
--flint-combobox-dropdown-max-height250px
--flint-combobox-z-index1000
--flint-font-family—
--flint-input-border-color—
--flint-input-border-radius—
--flint-text-color—
--flint-input-bg—
--flint-primary-color—
--flint-primary-focus-ring—
--flint-input-disabled-bg—
--flint-text-color-subtle—
--flint-surface-background—
--flint-border-color—
--flint-shadow-lg—
--flint-hover-color—
--flint-primary-color-light—
--flint-text-color-muted—