2.20.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) |
---|---|---|---|---|
attributes | A Drupal-style attributes object with extra attributes to append to this component. |
object
| — |
|
content | Main content of the band. |
string , array , object |
— |
|
pinned_content | Pinned content of the band. |
object
| — |
|
tag | Controls the semantic HTML tag to use for the band's content. |
string
|
div
|
|
valign | Controls the internal vertical alignment of the band's content. |
string
|
middle
|
|
size | Controls the vertical spacing of the band. |
string
|
medium
|
|
full_bleed | If set to true, the band will take the full width of the page. |
boolean
|
true
|
|
theme | Controls the theme of the band. |
any
|
dark
|
|
row_gutter | Please use |
| — |
|
content_row_start | Please use |
| — |
|
items | Please use |
| — |
|
fullBleed | This prop has been renamed. Please use |
| — |
|
contentTag | 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.