Select

Select component is a component that allows users pick a value from predefined options.

    SourceTheme source@chakra-ui/select

Props#

The Select component composes Box so you can pass all Box props, and native Select props in addition to these:

colorScheme

Description

The visual color appearance of the component

Type
"whiteAlpha" | "blackAlpha" | "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "cyan" | "purple" | "pink" | "linkedin" | "facebook" | "messenger" | "whatsapp" | "twitter" | "telegram"

errorBorderColor

Description

The border color when the select is invalid. Use color keys in `theme.colors`

Type
string

focusBorderColor

Description

The border color when the select is focused. Use color keys in `theme.colors`

Type
string

icon

Description

The icon element to use in the select

Type
ReactElement<any, string | JSXElementConstructor<any>>

iconColor

Description

The color of the icon

Type
string

iconSize

Description

The size (width and height) of the icon

Type
string

isDisabled

Type
boolean
Default
false

isInvalid

Description

If true, the form control will be invalid. This has 2 side effects: - The FormLabel and FormErrorIcon will have `data-invalid` set to true - The form element (e.g, Input) will have `aria-invalid` set to true

Type
boolean
Default
false

isReadOnly

Description

If true, the form control will be readonly

Type
boolean
Default
false

isRequired

Description

If true, the form control will be required. This has 2 side effects: - The FormLabel will show a required indicator - The form element (e.g, Input) will have `aria-required` set to true

Type
boolean
Default
false

rootProps

Description

Props to forward to the root div element

Type
RootProps

size

Description

The size of the Select

Type
"lg" | "md" | "sm" | "xs"
Default
md

variant

Description

The variant of the Select

Type
"outline" | "filled" | "flushed" | "unstyled"
Default
outline
Edit this page on GitHub

Proudly made inNigeria by Segun Adebayo

Deployed by â–² Vercel