Skip to content

Select / Multiselect

TIP

Select is a wrap over DropdownMenu with the addition of new selection features.

Select

jsx
import Select from 'intergalactic/select';
<Select />;
import Select from 'intergalactic/select';
<Select />;

SelectProps

& & {...}
NameTypeDescription
multiselectbooleanMultiple select
options[]Options array
defaultValueThe value or values array selected by default when using multiselect
valueThe selected value or values array when using multiselect
onChange((value: , e: React.SyntheticEvent) => boolean | void) | React.Dispatch<React.SetStateAction<>>Callback on value change
placeholderReact.ReactNodeTrigger placeholder at not selected value
state"normal" | "valid" | "invalid"Trigger state
disabledbooleanDisables select
namestringIf provided, adds a hidden <input /> tag with the given name for enhancing accessibility.
localestring
scrollToSelectedbooleanIf enabled, after opening select popper view will be scrolled to selected option or, if there are multiple selected options, to the first selected option.

Select.Trigger

It is a wrap over the <DropdownMenu.Trigger/> component with default tag ButtonTrigger.

jsx
import Select from 'intergalactic/select';
<Select.Trigger />;
import Select from 'intergalactic/select';
<Select.Trigger />;

Select.Menu

jsx
import Select from 'intergalactic/select';
<Select.Menu />;
import Select from 'intergalactic/select';
<Select.Menu />;

Select.InputSearch

It is a wrap over the <Input.Value/>.

jsx
import { InputSearch } from 'intergalactic/select';
<InputSearch />;
import { InputSearch } from 'intergalactic/select';
<InputSearch />;

Select.Option

jsx
import Select from 'intergalactic/select';
<Select.Option />;
import Select from 'intergalactic/select';
<Select.Option />;

SelectOptionProps

& {...}
NameTypeDescription
valuestring | numberValue of the option

Select.OptionHint

jsx
import Select from 'intergalactic/select';
<Select.OptionHint />;
import Select from 'intergalactic/select';
<Select.OptionHint />;

Select.OptionTitle

jsx
import Select from 'intergalactic/select';
<Select.OptionTitle />;
import Select from 'intergalactic/select';
<Select.OptionTitle />;

Select.OptionCheckbox

jsx
import Select from 'intergalactic/select';
<Select.OptionCheckbox />;
import Select from 'intergalactic/select';
<Select.OptionCheckbox />;

SelectOptionCheckboxProps

& {...}
NameTypeDescription
themestringCheckbox theme
indeterminatebooleanVisual indeterminate state
selectedboolean

Select.Option.Checkbox

jsx
import Select from 'intergalactic/select';
<Select.Option.Checkbox />;
import Select from 'intergalactic/select';
<Select.Option.Checkbox />;

Styled Box.

Released under the MIT License.

Released under the MIT License.