Skip to content

Select / Multiselect

TIP

Select is a wrapper over DropdownMenu with additional selection features.

Select

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

SelectProps

& & {...}
NameTypeDescription
multiselectboolean Multiple select
options[] Options array
defaultValue The value or values array selected by default when using multiselect
value The selected value or values array when using multiselect
onChange((value: , e: React.SyntheticEvent) => boolean | void) | React.Dispatch<React.SetStateAction<>> Callback on value change
placeholderReact.ReactNode Trigger placeholder at not selected value
state"normal" | "valid" | "invalid" Trigger state
disabledboolean Disables select
namestring If provided, adds a hidden <input /> tag with the given name for enhancing accessibility.
localestring
scrollToSelectedboolean If 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

A wrapper over DropdownMenu.Trigger with ButtonTrigger as the default tag.

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

Select.Menu

A wrapper over Select.Popper and Select.List, with all props passed to Select.List.

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

Select.Popper

A wrapper over DropdownMenu.Popper.

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

Select.List

A wrapper over DropdownMenu.List.

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

Select.InputSearch

A wrapper over Input with a Search icon and a Clear button as default addons.

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

Select.Group

A wrapper over Dropdown.Group.

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

Select.Option

A wrapper over DropdownMenu.Item with additional props.

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

SelectOptionProps

& {...}
NameTypeDescription
selectedboolean Enables selected state
valuestring | number Value of the option

Select.Option.Hint

Styled Flex.

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

Select.Option.Checkbox

A styled Box that looks like a checkbox.

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

SelectOptionCheckboxProps

& {...}
NameTypeDescription
themestring Checkbox theme
indeterminateboolean Visual indeterminate state
selectedboolean

Deprecated

Select.OptionHint

WARNING

The Select.OptionHint is deprecated, use Select.Option.Hint or Select.Group with subTitle prop instead.

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

Select.OptionTitle

WARNING

The Select.OptionTitle is deprecated, use Select.Group with title prop instead.

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

Released under the MIT License.

Released under the MIT License.