Dropdown
Description
Dropdown is a lightweight context menu for housing navigation and actions.
They're great for instances where you don't need the full power (and code) of the SelectMenu.
Arguments
| Name | Default | Description |
|---|---|---|
overlay | SymbolOne of | |
with_caret | BooleanWhether or not a caret should be rendered in the button. | |
system_arguments | Hash |
Slots
button
Required trigger for the dropdown. Has the same arguments as Primer::ButtonComponent,
but it is locked as a summary tag.
| Name | Default | Description |
|---|---|---|
aria_label_open | StringDefaults to "Close". Value to announce when menu is open. | |
aria_label_closed | StringDefaults to "Open". Value to announce when menu is closed. |
menu
Required context menu for the dropdown.
| Name | Default | Description |
|---|---|---|
as | SymbolWhen | |
direction | SymbolOne of | |
scheme | SymbolPass | |
header | StringOptional string to display as the header | |
system_arguments | Hash |
Dropdown::Menu::Item
Items to be rendered in the Dropdown menu.
Dropdown::Menu
This component is part of Dropdown and should not be
used as a standalone component.
Arguments
| Name | Default | Description |
|---|---|---|
as | SymbolWhen | |
direction | SymbolOne of | |
header | StringHeader to be displayed above the menu. | |
system_arguments | Hash |
Slots
items
| Name | Default | Description |
|---|---|---|
tag | SymbolOne of | |
divider | BooleanWhether the item is a divider without any function. | |
system_arguments | Hash |