Select
import { Select } from '@tulsa/core';
<Select required>
<Select.Option value={"Hello"}>Hello</Select.Option>
<Select.Option value={"World"}>World</Select.Option>
</Select>
Props
Name | Type | Description | Default |
---|---|---|---|
placeholder | string | Sets an option that will be displayed automatically | |
required | boolean | Sets whether or not a value is required to be selected for the element |
Native props are forwarded to the root component.
Examples
Placeholder
<Select placeholder='Placeholder'>
<Select.Option value={"Hello"}>Hello</Select.Option>
<Select.Option value={"World"}>World</Select.Option>
</Select>
Disabled
<Select disabled>
<Select.Option value={"Hello"}>Hello</Select.Option>
<Select.Option value={"World"}>World</Select.Option>
</Select>
Option Groups
<Select placeholder='Placeholder'>
<Select.OptGroup label="Group 1">
<Select.Option value={"Hello"}>Hello</Select.Option>
<Select.Option value={"World"}>World</Select.Option>
</Select.OptGroup>
<Select.OptGroup label="Group 2">
<Select.Option value={"Hello"}>Hello</Select.Option>
<Select.Option value={"World"}>World</Select.Option>
</Select.OptGroup>
</Select>
Select.Option
Props
Name | Type | Description | Default |
---|---|---|---|
value * | string | Value of the option |
Native props are forwarded to the root component.
Select.OptGroup
Props
HTMLProps<"optgroup">