Menu

An accessible dropdown menu for the common dropdown menu button design pattern. Menu uses roving tabIndex for focus management.

    SourceTheme Source@chakra-ui/menu

Props#

MenuButton composes Box so you can pass all Box props to change its style.

MenuList composes Box so you can pass all Box props to change its style.

closeOnSelect

Description

Overrides the parent menu's closeOnSelect prop.

Type
boolean

command

Description

Right-aligned label text content, useful for displaying hotkeys.

Type
string

commandSpacing

Description

The spacing between the command and menu item's label.

Type
ResponsiveValue<string | number | (string & {})>

icon

Description

The icon to render before the menu item's label.

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

iconSpacing

Description

The spacing between the icon and menu item's label.

Type
ResponsiveValue<string | number | (string & {})>

isDisabled

Description

If true, the menuitem will be disabled

Type
boolean

isFocusable

Description

If true and the menuitem is disabled, it'll remain keyboard-focusable

Type
boolean

MenuGroup composes Box so you can pass all Box props to change its style.

defaultValue

Type
string | string[]

onChange

Type
(value: string | string[]) => void

type

Type
"radio" | "checkbox"

value

Type
string | string[]

MenuItemOption composes Box so you can pass all box props in addition to these:

closeOnSelect

Description

Overrides the parent menu's closeOnSelect prop.

Type
boolean

command

Description

Right-aligned label text content, useful for displaying hotkeys.

Type
string

commandSpacing

Description

The spacing between the command and menu item's label.

Type
ResponsiveValue<string | number | (string & {})>

icon

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

iconSpacing

Description

The spacing between the icon and menu item's label.

Type
ResponsiveValue<string | number | (string & {})>

isChecked

Type
boolean

isDisabled

Description

If true, the menuitem will be disabled

Type
boolean

isFocusable

Description

If true and the menuitem is disabled, it'll remain keyboard-focusable

Type
boolean

type

Type
"radio" | "checkbox"

value

Type
string
Edit this page on GitHub

Proudly made inNigeria by Segun Adebayo

Deployed by â–² Vercel