Skip to content

Sweep hero

Sweep hero · sample rowOpen ↗

Renders HeroSweep from @bison-lab/ui. Same fields as Hero. New pages save this slug. Existing hero rows re-key here. Its calls to action are edited as on Hero: the kit items list, label and destination on each row, two at most.

tone is the brand sweep, a flat dark band, or Plain (light), the page surface. A section background replaces that fill. The band keeps its own padding, including the clearance under a floating header. When the next band floats, overlapBelow lengthens the bottom so the neighbour can sit across the seam.

imageAspect is the lead image’s frame: landscape (3:2, the default and the frame every existing row keeps), portrait (4:5, the product-shot shape), or square (1:1). The image covers the frame rather than letterboxing in it, and the crop lands on the focal point set on the image’s Media document; an image with no focal point crops from the centre. There is no per-placement zoom or pan: to change what a crop keeps, move the focal point on the image.

align is where the copy sits when the hero has no image: Left (start, the default) or Centered (center), which centers the eyebrow, heading, body and calls to action on the measure. The editor offers it only while Image is empty, and the renderer ignores it beside an image, where the copy keeps its column. For centered prose further down a page, the Rich text block’s Align control already carries through to the page.

payload.config.ts / collections
import { HeroSweepBlock } from "@bison-lab/payload-blocks";
// In the collection's `blocks` array:
HeroSweepBlock
blocks/registry.ts
import { HeroSweepBlockRenderer } from "@bison-lab/payload-blocks/react";
// In the site's registry:
heroSweep: HeroSweepBlockRenderer,
FieldTypeNotes
eyebrowtextSmall label above the heading. Optional.
heading *text
bodytextarea
toneselectHow the band is painted. Plain is the page surface. One of sweep, dark, light. Default "sweep".
imageuploadOptional lead image. From the large breakpoint it sits beside the copy. Set its focal point on the image to choose what the crop keeps. From the media collection.
imageAspectselectThe lead image's shape. The image fills it, cropped toward the focal point set on the image. One of landscape, portrait, square. Default "landscape".
alignselectWhere the copy sits when the hero has no image. One of start, center. Default "start".
linksarrayUp to 2 rows.
links[].typeradioLabelled “Link”. One of page, external. Default "page".
links[].page *relationshipRelationship to pages.
links[].href *textLabelled “URL”. A full URL ("https://example.com"), "mailto:" or "tel:", or a site path ("/contact").
links[].label *textLabelled “Label”.
links[].newTabcheckboxLabelled “Open in a new tab”. Default false.
settingsgroupLabelled “Block Settings”.
settings.backgroundselectLabelled “Background”. The surface this section sits on. Page is the plain page background. One of page, card, muted, color, gradient. Default "page".
settings.backgroundColortextLabelled “Color”.
settings.backgroundColorDarktextLabelled “Dark mode color”.
settings.gradientTotextLabelled “Gradient end”.
settings.gradientToDarktextLabelled “Dark mode gradient end”.
settings.gradientDirectiontextLabelled “Gradient direction”.
settings.spacingselectLabelled “Spacing”. The air above and below this section. Default is the block's own padding; Compact and Spacious replace it. This is the band, not the site-wide spacing in Theme → Appearance. One of compact, default, spacious. Default "default".
settings.anchortextLabelled “Anchor”. In-page links can target this section. Leave blank for none.
settings.hiddencheckboxLabelled “Hidden”. The section stays in the editor and is left off the page. Default false.

* required.