Components · Form Controls
Autocomplete
StableSince v0.0.1
Type-to-search input with matching options dropdown.
import { Autocomplete } from '@nexub/react';Examples
Default
With loading state
Custom empty text
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| optionsrequired | { value: string; label: string }[] | — | Array of options available for selection. |
| value | string | — | The controlled selected value. |
| onValueChange | (value: string) => void | — | Callback fired when the selected value changes. |
| placeholder | string | — | Placeholder text shown in the input when empty. |
| emptyText | string | — | Text shown when no options match the current search query. |
| loading | boolean | — | Shows a loading indicator while options are being fetched. |
On iOS & Android
Web only
Autocomplete has no @nexub/react-native twin. On phones, follow the platform pattern instead, or compose it from the native components listed on the React Native page.