{% set menu_item_one %}
{% include '@bolt-elements-text-link/text-link.twig' with {
content: 'Menu Item One',
attributes: {
type: 'button',
}
} only %}
{% endset %}
{% set menu_item_two %}
{% include '@bolt-elements-text-link/text-link.twig' with {
content: 'Menu Item Two',
attributes: {
type: 'button',
}
} only %}
{% endset %}
{% set menu_item_three %}
{% include '@bolt-elements-text-link/text-link.twig' with {
content: 'Menu Item Three',
attributes: {
type: 'button',
}
} only %}
{% endset %}
{% set list_items %}
{% include '@bolt-elements-menu/menu-item.twig' with {
content: menu_item_one,
} only %}
{% include '@bolt-elements-menu/menu-item.twig' with {
content: menu_item_two,
} only %}
{% include '@bolt-elements-menu/menu-item.twig' with {
content: menu_item_three,
} only %}
{% endset %}
{% include '@bolt-elements-menu/menu.twig' with {
content: list_items,
} only %}
Prop Name | Description | Type | Default Value | Option(s) |
---|---|---|---|---|
attributes
|
A Drupal-style attributes object with extra attributes to append to this element. |
object
| — |
|
content
|
Menu items. Accepts @bolt-elements-menu/menu-item.twig. |
string
, array
, object
|
— |
|
title
|
The menu element can have a title if needed. |
string
| — |
|
spacing
|
Controls the inset spacing of each menu item. |
string
|
small
|
|
Prop Name | Description | Type | Default Value | Option(s) |
---|---|---|---|---|
attributes
|
A Drupal-style attributes object with extra attributes to append to this element. |
object
| — |
|
content
|
Menu item. It's recommended to use a basic text link here @bolt-elements-text-link/text-link.twig |
any
| — |
|
npm install @bolt/elements-menu