{% set image %}
{% include '@bolt-elements-image/image.twig' with {
background: true,
attributes: {
src: '/images/placeholders/backgrounds/background-light-tall.jpg',
srcset: '/images/placeholders/backgrounds/background-light-tall-640.jpg 640w, /images/placeholders/backgrounds/background-light-tall-1024.jpg 1024w, /images/placeholders/backgrounds/background-light-tall-1920.jpg 1920w',
width: 3840,
height: 2160,
},
} only %}
{% endset %}
<div style="height: 400px; position: relative;" class="t-bolt-black">
{% include '@bolt-components-background/background.twig' with {
fill: 'gradient',
items: [
image,
]
} only %}
</div>
Prop Name | Description | Type | Default Value | Option(s) |
---|---|---|---|---|
attributes
|
A Drupal-style attributes object with extra attributes to append to this component. |
object
| — |
|
opacity
|
Overlay opacity |
string
|
none
|
|
fill
|
Type of fill to use for the overlay. |
string
|
solid
|
|
focal_point
|
Point where the background gradient highlight should originate. |
object
| — |
|
video
|
Set to true if you like to use video as a background. |
boolean
|
false
|
|
video_toggle_button
|
A Drupal-rendered button that will play and pause a background video. |
any
| — |
|
items
|
An array of renderable items to place in the background. |
array
| — |
|
shape_group
|
Add a Bolt Background Shapes group. |
string
|
none
|
|
shape_alignment
|
Alignment of shape group. |
string
|
right
|
|
npm install @bolt/components-background