Select

Select is a component used for allowing a user to choose values from a list of options.

Usage

import { Select } from "@yamada-ui/react"
<Select.Root>
  <Select.Group>
    <Select.Option />
    <Select.Label />
  </Select.Group>
  <Select.Separator />
</Select.Root>

Group Options

Use Items

Change Variant

Change Size

Change Color Scheme

Set Default Value

To set a default value, set a value in defaultValue.

Enable Multiple Selection

To enable multiple selection, set multiple to true.

Limit Maximum Selection Count

To limit the maximum selection count, set a number to max.

Change Separator

To change the separator, set a string to separator. By default, , is set.

Enable Clear Button

To enable the clear button, set clearable to true.

Change Offset

To change the offset, set values to gutter or offset.

Change Animation

To change the animation, set values like "block-start" or "inline-end" to animationScheme. By default, "scale" is set.

Change Placement

To change the placement, set values like "start" or "end-end" to placement. By default, "end" is set.

Exclude Placeholder from Options

To exclude the placeholder from options, set includePlaceholder to false.

Block Scroll

To block scroll, set blockScrollOnMount to true.

Close Dropdown On Scroll

To close the dropdown on scroll, set closeOnScroll to true.

Don't Close Dropdown on Selection

To not close the dropdown on selection, set closeOnSelect to false.

Disable Close on Blur

To disable close on blur, set closeOnBlur to false.

Disable Close Dropdown on ESC Key Press

To disable close on ESC key press, set closeOnEsc to false.

Disable Options

To disable specific options, set disabled to true.

Disable

To disable, set disabled to true.

Read-Only

To read-only, set readOnly to true.

Invalid

To make invalid, set invalid to true.

Change Border Color

To change the border color, set a value to focusBorderColor or errorBorderColor.

Customize Icon

Customize Option Icon

Customize Multiple Selection Display

Control

Props

Accessibility

Currently, this section is being updated due to the migration of v2.