Dropdown

Displays a menu to the user — such as a set of actions or functions — triggered by a button.

code
Expend code

#Radio Group

code
Expend code

DropdownMenu

A container component for a dropdown menu.

PropTypeDefaultDescription
childrenReact.ReactNode-Includes components inside the dropdown menu.

DropdownMenuTrigger

A trigger component that opens the dropdown menu.

PropTypeDefaultDescription
childrenReact.ReactNode-Includes the button or other trigger elements to open the dropdown menu.
toggleStatusBar(event: React.MouseEvent) => void-Includes the button or other trigger elements to open the dropdown menu.
buttonRefReact.RefObject<HTMLButtonElement>-Provides a reference to the trigger button.

DropdownMenuContent

A component that displays the content of the dropdown menu.

PropTypeDefaultDescription
showStatusBarbooleanfalseControls whether the dropdown menu is open.
toggleStatusBar(event: React.MouseEvent) => void-A function that toggles the open/close state of the dropdown menu.
menuRefReact.RefObject<HTMLDivElement>-Used to pass a reference to the menu content.
buttonRefReact.RefObject<HTMLButtonElement>-Used to pass a reference to the trigger button.
childrenReact.ReactNode-Includes the content to be displayed inside the dropdown menu.

DropdownMenuLabel

A component that displays the label for dropdown menu items.

PropTypeDefaultDescription
childrenReact.ReactNode-Includes the label text or content.

DropdownMenuItem

A component that represents each item in the dropdown menu.

PropTypeDefaultDescription
childrenReact.ReactNode-Includes the content to be displayed in the dropdown menu item.
hrefstring-The URL used when the item behaves like a link. If not specified, it will be displayed as plain text.