List with Horizontal Alignment
Adjust the horizontal alignment of List Items.
Important Notes:
The align
prop only works when the display
prop is set to horizontal
.
Demo
Horizontally align horizontal content: start
Horizontally align horizontal@medium content: start
Horizontally align horizontal content: center
Horizontally align horizontal@medium content: center
Horizontally align horizontal content: end
Horizontally align horizontal@medium content: end
Horizontally align horizontal content: justify
Horizontally align horizontal@medium content: justify
Twig
{% 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 %}
HTML
<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>