Skip to main content

molecules

Band

A decorative full-bleed plate with inset shadows that sits behind sibling content, optionally filled with a parallax image.

Specimens

Solid plate The parent must be relative and isolated, and the band spans its height.
{{ Band.render({ classes: "left-0" }) }}
With an image The image is taller than the band, which leaves room for scroll parallax.
{{ Band.render({ classes: "left-0", image: cms.home.0.statements.0.image }) }}

Params

ParamTypeNotes
imageSanity image objectOptional. Rendered from asset.url through imageUrl({w: 1920, q: 75}), with empty alt and loading="lazy".
classesstring, variant map or arrayAppended to the band root. Callers pass the negative left offset here.
attrsstringExtra attributes on the root, such as the data-hero-el="band" hook.
imageAttrsstringExtra attributes on the <img>, such as data-hero-el="band-image".

Notes

On the homepage the caller passes a negative left offset through classes so the full-width band reaches the viewport edge. Here the offset is zero.