2.14.0
Band Component in Bolt
Band is a general content container with spacing and background options. Part of the Bolt Design System.
npm install @bolt/components-band
{% include "@bolt-components-band/band.twig" with {
content: "This is a band.",
} only %}
Note: when assigning component props as HTML attributes on a web component, make sure to use kebab-case
.
Prop Name | Description | Type | Default Value | Option(s) |
---|---|---|---|---|
|
A Drupal-style attributes object with extra attributes to append to this component. |
object
| — |
|
|
Main content of the band. |
string , array , object |
— |
|
|
Pinned content of the band. |
object
| — |
|
|
Controls the semantic HTML tag to use for the band's content. |
string
|
div
|
|
|
Controls the vertical spacing of the band. |
string
|
medium
|
|
|
If set to true, the band will take the full width of the page. |
boolean
|
true
|
|
|
Controls the theme of the band. |
string
|
dark
|
|
|
Please use |
| — |
|
|
Please use |
| — |
|
|
Please use |
| — |
|
|
This prop has been renamed. Please use |
| — |
|
|
This prop is no longer needed. |
| — |
|
Note: turn off full bleed option if you don't want the band to span the full width of the page.
This band spans the full width of the page, it ignores the spacing of its parent container.
This band only takes up the available space within its parent container, it accounts for the spacing of its parent container.
This Is a Subheadline
This Is a Subheadline
This Is a Subheadline
Note: please convert the deprecated items prop to the new pinned_content prop.
{% include "@bolt-components-band/band.twig" with {
content: content,
items: [
{
position: {
align: "end",
valign: "center",
row_start: 1,
column_start: 1,
column_end: 12,
},
content: pinned_share,
},
]
} only %}
{% include "@bolt-components-band/band.twig" with {
content: content,
pinned_content: {
upper: [
{
content: pinned_share,
align: "end",
},
],
}
} only %}
This Is an Eyebrow
This Is a Subheadline
This is a paragraph.