Skip to main content
Version: Next

Combobox API

import { Combobox } from '@editora/ui-react';

Props​

PropTypeDescription
allowCustomboolean
autofocusboolean
childrenReact.ReactNode
clearableboolean
debouncenumber
defaultValuestringStarting value of an uncontrolled combobox (written once, on mount).
descriptionstring
disabledboolean
emptyTextstring
labelstring
maxlengthnumber
namestring
noFilterboolean
onChange(value: string) => void
onClear() => void
onClose() => void
onCloseDetail(detail: { open: boolean; previousOpen: boolean; source: string }) => void
onDebouncedInput(query: string) => void
onInput(query: string) => void
onOpen() => void
onOpenDetail(detail: { open: boolean; previousOpen: boolean; source: string }) => void
onSelect(value: string, label: string) => void
openboolean
placeholderstring
radius'none' | 'large' | 'full' | string
readOnlyboolean
requiredboolean
size'sm' | 'md' | 'lg' | '1' | '2' | '3'
state'idle' | 'loading' | 'error' | 'success'
stateTextstring
validation'error' | 'success' | 'none'
valuestringThe selected value. With onChange/onSelect it is controlled: a pick the parent rejects is undone.
variant'classic' | 'surface' | 'soft'

Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).

Combobox.Option props​

PropTypeDescription
childrenReact.ReactNode
descriptionstring

Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).

Element: <ui-combobox>​

Combobox renders the ui-combobox custom element from @editora/ui-core, which can also be used without React.

Attributes: allow-custom, aria-describedby, aria-description, aria-label, autofocus, clearable, debounce, description, disabled, empty-text, headless, label, maxlength, name, no-filter, open, placeholder, radius, readonly, required, size, state, state-text, validation, value, variant

Events: change, clear, debounced-input, input, select