Combobox
Combobox combines an input field with an inline filterable popup menu.
Usage
import { useState } from 'react';import { Combobox, ComboboxInput, ComboboxContent, ComboboxList, ComboboxItem } from '@masumdev/rn-ui';
export function ComboboxExample() { const [selected, setSelected] = useState('');
return ( <Combobox value={selected} onValueChange={setSelected}> <ComboboxInput placeholder="Select framework..." /> <ComboboxContent> <ComboboxList> <ComboboxItem value="expo">Expo React Native</ComboboxItem> <ComboboxItem value="cli">React Native CLI</ComboboxItem> </ComboboxList> </ComboboxContent> </Combobox> );}Props API
| Prop | Type | Default | Description |
|---|---|---|---|
value | string | — | Selected option value. |
onValueChange | (value: string) => void | — | Callback when option is selected. |