Skip to main content

Select

Implementation#

import { Select } from "slipstream-ui";
const Example = () => <Select>...</Select>;

Default#

Example

Validation#

Example
<Select size="sm">...</Select>
<Select size="md">...</Select>
<Select size="lg">...</Select>

Sizing#

Example
<Select size="sm">...</Select>
<Select size="md">...</Select>
<Select size="lg">...</Select>

Rounded#

Example
<Select rounded>...</Select>

Option Group#

Option Groups are a great way to group options into their respective sections. Technically, the optiongroup and option elements cannot be styled per browser spec. As a result, using the SelectOptionGroup and SelectOption components are optional and preferential.

Example
import { Select, SelectOptionGroup, SelectOption } from "slipstream-ui";
<Select>
<SelectOptionGroup label="">
<SelectOption>...</SelectOption>
<SelectOption>...</SelectOption>
<SelectOption>...</SelectOption>
</SelectOptionGroup>
</Select>;

Right-To-Left (rtl)#

Example
<Select rtl>...</Select>

Props#

Select#

AttributeTypeValueDefault ValueDescription
sizestringsm/md/lgmdSet size of text and select element
successbooleantrue/falseundefinedGreen border surrounding select element
invalidbooleantrue/falseundefinedRed border surrounding input element
disabledbooleantrue/falseundefinedDisabled select element both in UI and functionality
roundedbooleantrue/falseRounded out corners of input to become more circular in presentation
rtlbooleantrue/falseWhen true, sets element to direction of right-to-left (rtl)

SelectOption#

AttributeTypeValueDefault ValueDescription
valuestringHtml option element built-in value attribute

SelectOptionGroup#

AttributeTypeValueDefault ValueDescription
labelstringHtml option group element built-in label attribute