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 | Required | Description |
---|---|---|
overlay | Symbol One of | |
with_caret | Boolean Whether 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 | Required | Description |
---|---|---|
aria_label_open | String Defaults to "Close". Value to announce when menu is open. | |
aria_label_closed | String Defaults to "Open". Value to announce when menu is closed. |
menu
Required context menu for the dropdown.
Name | Required | Description |
---|---|---|
as | Symbol When | |
direction | Symbol One of | |
scheme | Symbol Pass | |
header | String Optional 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 | Required | Description |
---|---|---|
as | Symbol When | |
direction | Symbol One of | |
header | String Header to be displayed above the menu. | |
system_arguments | Hash |
Slots
items
Name | Required | Description |
---|---|---|
tag | Symbol One of | |
divider | Boolean Whether the item is a divider without any function. | |
system_arguments | Hash |