{% include '@bolt-components-background/background.twig' with {
opacity: 'heavy',
fill: 'gradient',
focal_point: {
vertical: 'center',
horizontal: 'center'
},
content_items: [
{
pattern: 'image',
src: '/images/content/backgrounds/background-tall-4.jpg'
}
]
} only %}
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
|
medium
|
|
shape_group
|
Add a Bolt Background Shapes group. |
string
|
none
|
|
shape_alignment
|
Alignment of shape group. |
string
|
right
|
|
fill
|
Type of fill to use for the overlay. |
string
|
color
|
|
fill_color
|
Color of the fill to use in the overlay. |
string
|
default
|
|
focal_point
|
Where the opacity background should originate. |
object
| — |
|
content_items
|
An array of objects to place in the background.Works with Image and Shape components.Video option is deprecated. |
array
| — |
|
overlay
(deprecated) |
Use opacity instead |
— | — |
|
shapeGroup
(deprecated) |
Use shape_group instead. |
— | — |
|
shapeAlignment
(deprecated) |
Use shape_alignment instead. |
— | — |
|
fillColor
(deprecated) |
Use fill_color instead. |
— | — |
|
focalPoint
(deprecated) |
Use focal_point instead. |
— | — |
|
contentItems
(deprecated) |
Use content_items instead. |
— | — |
|
npm install @bolt/components-background
Opacity: None
Opacity: Light
Opacity: Medium
Opacity: Heavy
Opacity: Full
Heavy Opacity with Left Focal Point
Heavy Opacity with Right Focal Point
Background Shapes: Shape Group A
Background Shapes: Shape Group B
Background Shapes: Shape Group A, Alignment Left
Note: valign
is an Image component prop, not a Background component prop. Set valign
on images passed in via content_items
to control the vertical alignment.
valign: center
valign: top
valign: bottom
valign: 25%