Skip to Content
MavKitOne is in beta. @mav-labs-inc/mavkit-react is not public packages yet.

Select

A WAI-ARIA select-only combobox (arrow keys, type-ahead, Home/End, Escape, outside-click, viewport-aware flip). Unlike AutoComplete, there’s no text input — the trigger just shows the selected option’s label.

Usage

import { Select } from '@mav-labs-inc/mavkit-react' <Select options={[{ value: 'a', label: 'Option A' }, { value: 'b', label: 'Option B' }]} placeholder="Choose…" onSelectionChange={onChange} />

Examples

Basic

  • Free
  • Pro(most popular)
  • Enterprise(contact sales)

Grouped options

Consecutive options sharing the same group render under one group label, with a separator before each new group.

  • United States
  • Canada
  • Germany
  • France

Props

PropTypeDefaultDescription
options*SelectOption[]—{ value: string; label: string; disabled?: boolean; note?: string; group?: string }[]
valuestring | null—Controlled selected value — pair with onSelectionChange.
defaultValuestring | null—
onSelectionChange(change: { value: string; label: string }) => void—
placeholderstring'Choose…'
namestring—Renders a hidden input for plain-form submission.
ariaLabelstring—
classNamestring—
disabledboolean—Disables the trigger with a real disabled attribute.
refRef<SelectHandle>—{ open(), close(), setValue(value) }
Last updated on