NativeSelect

NativeSelect is a component used for allowing users to select one value from a list of options. It displays a native dropdown list provided by the browser (user agent).

Usage

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

Use items

Change variant

Change size

Set default value

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

Grouping

To group options, use NativeSelect.Group.

Exclude placeholder from options

By default, a placeholder is included in the options. To exclude the placeholder from options, set includePlaceholder to false.

Disable option

To disable an option, set disabled to true in NativeSelect.Option.

Disable

To disable, set disabled to true.

Read-Only

To make read-only, set readOnly to true.

Invalid

To make invalid, set invalid to true.

Change border color

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

Customize icon

Control

Props

Accessibility

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