Skip to content

@agala-labs/ui

Select

Selects one or more values from a searchable, collision-aware top-layer listbox.

Examples

Default
<AgalaSelect v-model="country" :options="countries" searchable clearable />

Import

import { AgalaSelect } from '@agala-labs/ui'

API

PropTypeDefaultDescription
optionsSelectOption[]—Required option collection.
modelValuestring | string[]—Selected value(s).
multiplebooleanfalseEnables multi-select.
searchablebooleanfalseShows filtering input.
clearablebooleanfalseAllows clearing the selection.
loadingbooleanfalseShows a loading state.
size'sm' | 'md' | 'lg''md'Control size.
placeholderstring—Empty selection copy.
maxDisplayednumber—Maximum visible chips.
maxSelectionsnumber—Selection limit.
error / errorMessageboolean / string—Validation state and copy.
id / inputIdstring—ID bound to the combobox trigger.
namestring—Native form field name.
requiredbooleanfalseRequired state.
autocompletestring—Native form autocomplete token.
ariaLabel / ariaLabelledbystring—Accessible name or referenced label id.
ariaDescribedby / ariaDetails / ariaErrorMessagestring—Accessible supporting and validation references.

Events

  • update:modelValue(value)
  • search(query: string)

Accessibility

Implements combobox/listbox semantics with keyboard navigation, selected state, and expanded state. The option menu is never narrower than its trigger, expands narrow triggers to a legible width, and remains capped by the available viewport.

Released under the MIT License.