Skip to content

Combobox

Combobox combines an input field with an inline filterable popup menu.

Usage

ComboboxExample.tsx
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

PropTypeDefaultDescription
valuestringSelected option value.
onValueChange(value: string) => voidCallback when option is selected.