{% set list_items %}
{% include '@bolt-elements-list/list-item.twig' with {
content: placeholder_1,
} only %}
{% include '@bolt-elements-list/list-item.twig' with {
content: placeholder_2,
} only %}
...
{% include '@bolt-elements-list/list.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
|
Content of the List. List Items are expected here. |
any
| — |
|
tag
|
Set the semantic tag for the list. |
string
|
ul
|
|
display
|
Display either an horizontal list of items or a vertical list of items. Responsive options are also available for transforming from block to horizontal at specific breakpoints. |
string
|
vertical
|
|
spacing
|
Control the spacing in between items. |
string
|
xsmall
|
|
separator
|
Display a separator in between items. |
string
|
none
|
|
align
|
Control the horizontal alignment of items. |
string
|
start
|
|
valign
|
Control the vertical alignment of items. |
string
|
center
|
|
inset
|
Set spacing on the inside of each item. |
boolean
|
false
|
|
nowrap
|
Prevent horizontal/flex list items from wrapping to a second line. |
boolean
|
false
|
|
Prop Name | Description | Type | Default Value | Option(s) |
---|---|---|---|---|
attributes
|
A Drupal-style attributes object with extra attributes to append to this element. |
object
| — |
|
content
|
Content of the List Item. |
any
| — |
|
npm install @bolt/elements-list
{% set placeholder_1 %}
{% include '@bolt-components-placeholder/placeholder.twig' with {
text: 'Item 1',
size: 'xsmall',
} only %}
{% endset %}
{% set placeholder_2 %}
{% include '@bolt-components-placeholder/placeholder.twig' with {
text: 'Item 2',
size: 'xsmall',
} only %}
{% endset %}
{% set placeholder_3 %}
{% include '@bolt-components-placeholder/placeholder.twig' with {
text: 'Item 3',
size: 'xsmall',
} only %}
{% endset %}
{% set list_items %}
{% include '@bolt-elements-list/list-item.twig' with {
content: placeholder_1,
} only %}
{% include '@bolt-elements-list/list-item.twig' with {
content: placeholder_2,
} only %}
{% include '@bolt-elements-list/list-item.twig' with {
content: placeholder_3,
} only %}
{% endset %}
{% include '@bolt-elements-list/list.twig' with {
content: list_items
} only %}
<ul class="e-bolt-list">
<li class="e-bolt-list__item">Item 1</li>
<li class="e-bolt-list__item">Item 2</li>
<li class="e-bolt-list__item">Item 3</li>
</ul>
ul
and ol
tags when creating a List.
ul
tag is for grouping a collection of items that do not have a numerical ordering, and their order in the list is meaningless.ol
tag, the order is meaningful.{% set list_items %}
{% include '@bolt-elements-list/list-item.twig' with {
content: placeholder_1,
} only %}
{% include '@bolt-elements-list/list-item.twig' with {
content: placeholder_2,
} only %}
{% include '@bolt-elements-list/list-item.twig' with {
content: placeholder_3,
} only %}
{% endset %}
{% include '@bolt-elements-list/list.twig' with {
tag: 'ol',
content: list_items
} only %}
<ol class="e-bolt-list">
<li class="e-bolt-list__item">First item</li>
<li class="e-bolt-list__item">Second item</li>
<li class="e-bolt-list__item">Third item</li>
</ol>
display
prop is set to vertical
, List Items are full-width, stacked on one another.display
prop is set to horizontal
, List Items are side by side and take the width of the content. List Items can be of different widths if the content differs in length.display
prop is set to horizontal@[Breakpoint]
, List Items are vertical
below the specified breakpoint (xxsmall
, xsmall
, small
or medium
) and horizontal
above the breakpoint.horizontal@medium
List is horizontal above the chosen breakpoint and vertical below.{% set list_items %}
{% include '@bolt-elements-list/list-item.twig' with {
content: placeholder_1,
} only %}
{% include '@bolt-elements-list/list-item.twig' with {
content: placeholder_2,
} only %}
{% include '@bolt-elements-list/list-item.twig' with {
content: placeholder_3,
} only %}
{% endset %}
{% include '@bolt-elements-list/list.twig' with {
display: 'horizontal',
content: list_items
} only %}
<ul class="e-bolt-list e-bolt-list--display-horizontal">
<li class="e-bolt-list__item">First item</li>
<li class="e-bolt-list__item">Second item</li>
<li class="e-bolt-list__item">Thitd item</li>
</ul>
nowrap
prop.
nowrap
prop only works when the display
prop is set to horizontal
.{% set list_items %}
{% include '@bolt-elements-list/list-item.twig' with {
content: placeholder_1,
} only %}
{% include '@bolt-elements-list/list-item.twig' with {
content: placeholder_2,
} only %}
{% include '@bolt-elements-list/list-item.twig' with {
content: placeholder_3,
} only %}
...
{% endset %}
{% include '@bolt-elements-list/list.twig' with {
display: 'horizontal',
nowrap: true,
content: list_items
} only %}
<ul class="e-bolt-list e-bolt-list--display-horizontal e-bolt-list--nowrap">
<li class="e-bolt-list__item">First item</li>
<li class="e-bolt-list__item">Second item</li>
<li class="e-bolt-list__item">Third item</li>
<li class="e-bolt-list__item">Fourth item</li>
<li class="e-bolt-list__item">Fifth item</li>
<li class="e-bolt-list__item">Sixth item</li>
<li class="e-bolt-list__item">Seventh item</li>
<li class="e-bolt-list__item">Eighth item</li>
<li class="e-bolt-list__item">Ninth item</li>
</ul>
{% set list_items %}
{% include '@bolt-elements-list/list-item.twig' with {
content: placeholder_1,
} only %}
{% include '@bolt-elements-list/list-item.twig' with {
content: placeholder_2,
} only %}
{% include '@bolt-elements-list/list-item.twig' with {
content: placeholder_3,
} only %}
{% endset %}
{% include '@bolt-elements-list/list.twig' with {
spacing: 'medium',
content: list_items,
} only %}
<ul class="e-bolt-list e-bolt-list--spacing-medium">
<li class="e-bolt-list__item">First item</li>
<li class="e-bolt-list__item">Second item</li>
<li class="e-bolt-list__item">Third item</li>
</ul>
solid
or dashed
.
--m-bolt-border
CSS var with the attributes
object.{% set list_items %}
{% include '@bolt-elements-list/list-item.twig' with {
content: item_1,
} only %}
{% include '@bolt-elements-list/list-item.twig' with {
content: item_2,
} only %}
{% include '@bolt-elements-list/list-item.twig' with {
content: item_3,
} only %}
{% endset %}
{% include '@bolt-elements-list/list.twig' with {
separator: 'solid',
content: list_items
} only %}
<ul class="e-bolt-list e-bolt-list--separator-solid">
<li class="e-bolt-list__item">First item</li>
<li class="e-bolt-list__item">Second item</li>
<li class="e-bolt-list__item">Third item</li>
</ul>
inset
prop adds a space on all sides of List Items.
{% set list_items %}
{% include '@bolt-elements-list/list-item.twig' with {
content: placeholder_1,
} only %}
{% include '@bolt-elements-list/list-item.twig' with {
content: placeholder_2,
} only %}
{% include '@bolt-elements-list/list-item.twig' with {
content: placeholder_3,
} only %}
{% endset %}
{% include '@bolt-elements-list/list.twig' with {
separator: 'solid',
inset: true,
content: list_items
} only %}
<ul class="e-bolt-list e-bolt-list--separator-solid e-bolt-list--inset">
<li class="e-bolt-list__item">First item</li>
<li class="e-bolt-list__item">Second item</li>
<li class="e-bolt-list__item">Third item</li>
</ul>
align
prop only works when the display
prop is set to horizontal
.
{% set list_items %}
{% include '@bolt-elements-list/list-item.twig' with {
content: placeholder_1,
} only %}
{% include '@bolt-elements-list/list-item.twig' with {
content: placeholder_2,
} only %}
{% include '@bolt-elements-list/list-item.twig' with {
content: placeholder_3,
} only %}
{% endset %}
{% include '@bolt-elements-list/list.twig' with {
align: 'justify',
content: list_items
} only %}
<ul class="e-bolt-list e-bolt-list--align-justify">
<li class="e-bolt-list__item">First item</li>
<li class="e-bolt-list__item">Second item</li>
<li class="e-bolt-list__item">Third item</li>
</ul>
valign
prop only works when the display
prop is set to horizontal
.
{% include '@bolt-elements-list/list.twig' with {
valign: 'start',
content: list_items
} only %}
<ul class="e-bolt-list e-bolt-list--valign-start">
<li class="e-bolt-list__item">First item</li>
<li class="e-bolt-list__item">Second item</li>
<li class="e-bolt-list__item">Third item</li>
</ul>
The Pega Platform™ makes it simpler for enterprises to work smarter, unify experiences, and adapt instantly. Thanks to our scalable, made-to-measure architecture, even the biggest organizations can stay streamlined and ready for what’s next.
One of the objectives of Pega is to build a fast-growing, profitable enterprise that rewards our employees, shareholders, and partners. To achieve this, we must continuously earn the trust of our many stakeholders: employees, customers, partners, suppliers, shareholders, government officials, and the general public.
{% set intro %}
{% include '@bolt-elements-type/type.twig' with {
content: 'What we do',
hierarchy: 'headline',
tag: 'h2',
size: 'xxlarge',
} only %}
{% include '@bolt-elements-type/type.twig' with {
content: 'The Pega Platform™ makes it simpler for enterprises to work smarter...',
} only %}
{% set list_items %}
{% set button_1 %}
{% include '@bolt-elements-button/button.twig' with {
content: 'Explore products',
attributes: {
href: 'https://google.com',
}
} only %}
{% endset %}
{% include '@bolt-elements-list/list-item.twig' with {
content: button_1,
} only %}
//More buttons if needed
{% endset %}
{% include '@bolt-elements-list/list.twig' with {
display: 'horizontal',
content: list_items,
} only %}
{% endset %}
{% set layout_items %}
{% include '@bolt-layouts-layout/layout-item.twig' with {
content: intro
} only %}
{% endset %}
{% include '@bolt-layouts-layout/layout.twig' with {
content: layout_items,
template: [
'50@from-medium',
],
} only %}
<bolt-layout template="50@from-medium">
<bolt-layout-item>
<p class="e-bolt-type">
The Pega Platform™ makes it simpler for enterprises to work smarter, unify experiences, and adapt instantly. Thanks to our scalable, made-to-measure architecture, even the biggest organizations can stay streamlined and ready for what’s next.</p>
<ul class="e-bolt-list e-bolt-list--display-horizontal e-bolt-list--spacing-xsmall e-bolt-list--align-start e-bolt-list--valign-center">
<li class="e-bolt-list__item">
<a href="https://google.com" class="e-bolt-button">Explore products</a>
</li>
<li class="e-bolt-list__item">
<a href="https://google.com" class="e-bolt-button e-bolt-button--secondary">Why Pega</a>
</li>
</ul>
</bolt-layout-item>
</bolt-layout>