Skip to content

Select / Multiselect

TIP

Select is a wrapper over DropdownMenu with additional selection features.

Select

jsx
import Select from '@semcore/ui/select';
<Select />;

SelectProps

& & {...} & ( {tag?: never; size?: ["size"] } | {})
NameTypeDescription
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: ) => boolean | void) | Callback on value change
placeholder 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 Specifies the locale for i18n support
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 '@semcore/ui/select';
<Select.Trigger />;

Select.Menu

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

jsx
import Select from '@semcore/ui/select';
<Select.Menu />;

Select.Popper

A wrapper over DropdownMenu.Popper.

jsx
import Select from '@semcore/ui/select';
<Select.Popper />;

Select.List

A wrapper over DropdownMenu.List.

jsx
import Select from '@semcore/ui/select';
<Select.List />;

Select.InputSearch

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

jsx
import { InputSearch } from '@semcore/ui/select';
<InputSearch />;

Select.Group

A wrapper over Dropdown.Group.

jsx
import Select from '@semcore/ui/select';
<Select.Group />;

Select.Option

A wrapper over DropdownMenu.Item with additional props.

jsx
import Select from '@semcore/ui/select';
<Select.Option />;

SelectOptionProps

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

Select.Option.Hint

Styled Flex.

jsx
import Select from '@semcore/ui/select';
<Select.Option.Hint />;

Select.Option.Checkbox

A styled Box that looks like a checkbox.

jsx
import Select from '@semcore/ui/select';
<Select.Option.Checkbox />;

SelectOptionCheckboxProps

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

Select.Option.Text

An instance of Text with the appropriate styles depending on the Select size.

Plain text without addons placed directly in Select.Option is wrapped in Select.Option.Text automatically.

jsx
import Select from '@semcore/ui/select';
<Select.Option.Text />;

NSText.Props

& & ( {formatTags?: boolean; ellipsis?: never; ellipsisProps?: never; hint?: never; hintProps?: never } | ( {formatTags?: never } & & ))

Released under the MIT License.

Released under the MIT License.