BenixBenix DSv1.1.0

Select

Select built on Radix with optional inline search. Generic over the option type. Inline label/error/helperText supported.

Examples

With label

<Select
label="Country"
required
value={country}
onChange={setCountry}
options={[
{ value: 'br', label: 'Brazil' },
{ value: 'us', label: 'United States' },
]}
/>

Searchable

<Select
label="Framework"
searchable
value={framework}
onChange={setFramework}
options={[...]}
/>

API Reference

Props of the Select component.

PropTypeDefaultDescription
value*T——
onChange(value: T) => void——
options*{ value: T; label: string; disabled?: boolean }[]——
labelstring—Renders FormLabel above the trigger.
requiredbooleanfalse—
helperTextstring——
errorstring | boolean——
placeholderstring'Selecione...'—
searchablebooleanfalse—
searchPlaceholderstring——
disabledbooleanfalse—
variant'outline' | 'filled' | 'underlined''outline'—