The Layout component supports an animated mask reveal effect that uses an SVG shape to dramatically reveal content as the user scrolls. This animation is powered by the Motion library and provides smooth, performant transitions.
Add the data-bolt-animation attribute and choose one of the mask specification methods:
{% include '@bolt-layouts-layout/layout.twig' with {
content: layout_items,
background: background,
attributes: {
'data-bolt-animation': 'layout-mask-animation',
'data-bolt-mask-icon': 'chess-piece-solid',
}
} only %}
Or in HTML:
<bolt-layout data-bolt-animation="layout-mask-animation" data-bolt-mask-icon="chess-piece-solid">
<bolt-layout-item>
<!-- Your content -->
</bolt-layout-item>
</bolt-layout>
Note: Not every icon from the Bolt library works well as a mask – generally, solid, monomorphic icons are safest. Icons with internal fill areas (like calendar-solid) may reduce the reveal effect.
A history of
AI innovation
Over 40 years ago, Alan Trefler developed some of the first AI agents capable of playing chess at an elite level.
He applied the same principles to tech and business to unlock radical agility as never before.
{% include '@bolt-layouts-layout/layout.twig' with {
background: background,
content: layout_items,
attributes: {
'data-bolt-animation': 'layout-mask-animation',
'data-bolt-mask-icon': 'chess-piece-solid',
// Or use external SVG:
// 'data-bolt-mask-src': '/path/to/icon.svg',
// Or use inline SVG:
// 'data-bolt-mask-svg': '<svg>...</svg>',
}
} only %}
<bolt-layout data-bolt-animation="layout-mask-animation" data-bolt-mask-icon="chess-piece-solid">
<bolt-layout-item>
<!-- Content goes here -->
</bolt-layout-item>
<bolt-layout-item>
<!-- Content goes here -->
</bolt-layout-item>
</bolt-layout>