2.20.0
A vertical list of menu items. This component is usually used inside a popover container to provide additional actions.
Menu is part of the collection of components, visual styles, and build tools that power the the Bolt Design System.
npm install @bolt/components-menu
{% include "@bolt-components-menu/menu.twig" with {
items: [
{
content: "Menu Item 1",
attributes: {
"attribute-name": "function",
},
},
{
content: "Menu Item 2",
attributes: {
"attribute-name": "function",
},
},
]
} only %}
Note: when assigning component props as HTML attributes on a web component, make sure to use kebab-case
.
Prop Name | Description | Type | Default Value | Option(s) |
---|---|---|---|---|
attributes | A Drupal attributes object. Applies extra HTML attributes to the outer <bolt-menu> tag. |
object
| — |
|
items | Generates an array of items, each item is a <bolt-trigger>. While the content prop for each item can accept anything custom content, plain text is the recommended format. |
array
| — |
|
title | Controls the inset spacing of each menu item. |
string
| — |
|
spacing | Controls the inset spacing of each menu item. |
string
|
small
|
|