Skip to content

Select ​

Loading...

A select component for choosing one or multiple options from a list.

  • Tag: <flint-select>
  • Class: FlintSelect

Import ​

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

Usage ​

html
<flint-select></flint-select>

Properties ​

PropertyAttributeTypeDefaultDescription
labellabelstring''Label text displayed above the select.
optionsoptionsSelectOption[][]Array of selectable options.
valuevaluestring[][]Currently selected value(s).
multiplemultiplebooleanfalseAllow multiple selections.
placeholderplaceholderstring'Select an option'Placeholder text when no value is selected.
disableddisabledbooleanfalseDisables the select and prevents interaction.
readonlyreadonlybooleanfalseMakes the select read-only.
requiredrequiredbooleanfalseMarks the select as required for form validation.
errorerrorbooleanfalseWhether the select is in an error state.
errorMessageerror-messagestring''Error message displayed below the select.
namenamestring''Form field name used when submitting form data.
sizesizeSelectSize'md'Size variant of the select.
defaultValuedefault-valuestring''Sets the initial value in uncontrolled mode (single-select only).

Events ​

EventDetailDescription
flint-select-change—Dispatched when the selection changes. detail: { value: string | null } (single) or { value: string[] } (multiple)

Slots ​

NameDescription
iconOptional icon shown at the start of the trigger.
error-messageOptional slot for error message content (use error-message prop for simple text).

CSS Custom Properties ​

PropertyDefault
--flint-select-bg—
--flint-select-border—
--flint-select-radius—
--flint-select-focus-color—
--flint-select-error-color—
--flint-select-chip-bg—
--flint-select-chip-color—
--flint-select-chip-radius—
--flint-select-option-hover-bg—
--flint-select-option-selected-bg—
--flint-select-option-selected-color—
--flint-input-bg—
--flint-input-border-color—
--flint-input-border-radius—
--flint-primary-color—
--flint-error-color—
--flint-hover-color—
--flint-primary-color-light—
--flint-text-color-on-primary—
--flint-font-family—
--flint-label-color—
--flint-input-border-hover-color—
--flint-primary-focus-ring—
--flint-error-focus-ring—
--flint-input-disabled-bg—
--flint-input-readonly-bg—
--flint-input-placeholder-color—
--flint-text-color—
--flint-text-color-muted—
--flint-shadow-lg—
--flint-border-color—