Docs
Systhema Design (opens in new tab)
Unreleased

Hero blocks

Simple, Background and Feature heroes as standalone blocks you register yourself.

On this page

HeroSimpleBlock, HeroBackgroundBlock, HeroFeatureBlock (slugs heroSimple, heroBackground, heroFeature), with their field arrays (HeroSimpleFields, HeroBackgroundFields, HeroFeatureFields) on @systhemaui/payload/blocks/hero. They carry the same fields and render the same markup as the matching Hero type of the default page template's hero, as standalone blocks.

The default template uses the same fields for its hero variants. The following screenshots show those field groups, rather than standalone blocks registered in a custom picker.

Where it is offeredLink to this section

No default editor offers them; you register the ones you want through customBlocks, with the tiers you choose (see Converter below).

FieldsLink to this section

heroSimpleLink to this section

FieldTypeLabelDefaultNotes
addresstextDefine addressShown when siblingData?.isMediaEnabled; Required; Shown when siblingData?.mediaType==="googleMaps"
alignContentradioContent AlignmentleftRequired; Options: left (Left), center (Center), right (Right)
aspectRatioselectAspect RatioautoRequired; Shown when siblingData?.isMediaEnabled&&hasMedia(siblingData); Options: auto (Auto), 21/9-md (21:9 on desktop, 4:3 on mobile), 21/9 (cinema - 21:9), 16/9 (video - 16:9), 4/3 (landscape photo - 4:3), 3/2 (landscape photo - 3:2), 1/1 (square - 1:1)
autoPlaycheckboxAutoplayShown when siblingData?.isMediaEnabled; Shown when siblingData?.mediaType==="video"&&siblingData?.video&&!siblingData?.poster
controlscheckboxControlstrueShown when siblingData?.isMediaEnabled; Shown when siblingData?.mediaType==="video"&&siblingData?.video&&!siblingData?.poster
descriptionrichTextDescription
imageuploadSelect imageShown when siblingData?.isMediaEnabled; Required; Shown when siblingData?.mediaType==="image"; Related to uploads
isMediaEnabledcheckboxMedia Enabledfalse
labeltextLabel (optional)
mediaTyperadioMedia TypeimageRequired; Shown when siblingData?.isMediaEnabled; Options: image (Image), video (Video), youtube (YouTube), googleMaps (Google Maps)
objectFitradioObject FitcoverShown when siblingData?.isMediaEnabled&&hasMedia(siblingData)&&siblingData?.aspectRatio!=="auto"; Required; Options: cover (Cover), contain (Contain)
objectPositionXradioHorizontal AlignmentcenterShown when siblingData?.isMediaEnabled&&hasMedia(siblingData)&&siblingData?.aspectRatio!=="auto"; Required; Options: left (Left), center (Center), right (Right)
objectPositionYradioVertical AlignmentcenterShown when siblingData?.isMediaEnabled&&hasMedia(siblingData)&&siblingData?.aspectRatio!=="auto"; Required; Options: top (Top), center (Center), bottom (Bottom)
parallaxcheckboxEnable parallax effectfalseShown when siblingData?.isMediaEnabled&&hasParallaxMedia(siblingData)
posteruploadPoster image (optional)Shown when siblingData?.isMediaEnabled; Shown when siblingData?.mediaType==="video"&&siblingData?.video||siblingData?.mediaType==="youtube"&&siblingData?.youtubeUrl; Related to uploads
preloadselectPreloadmetadataShown when siblingData?.isMediaEnabled; Required; Shown when condition(siblingData); Options: metadata (Metadata — first frame only (recommended)), none (None — nothing until play), auto (Auto — download the whole video up front)
titletextTitleRequired
videouploadSelect videoShown when siblingData?.isMediaEnabled; Required; Shown when siblingData?.mediaType==="video"; Related to uploads
youtubeUrltextPaste Youtube URLShown when siblingData?.isMediaEnabled; Required; Shown when siblingData?.mediaType==="youtube"
zoomnumberDefault zoom14Shown when siblingData?.isMediaEnabled; Required; Shown when siblingData?.mediaType==="googleMaps"

heroBackgroundLink to this section

FieldTypeLabelDefaultNotes
alignContentradioContent AlignmentleftRequired; Options: left (Left), center (Center), right (Right)
backgrounduploadSelect image or videoRequired; Related to uploads
descriptionrichTextDescription
disableOverlaycheckboxDisable overlayfalse
labeltextLabel (optional)
parallaxcheckboxEnable parallax effectfalseShown when siblingData?.background
titletextTitleRequired

heroFeatureLink to this section

FieldTypeLabelDefaultNotes
addresstextDefine addressRequired; Shown when siblingData?.mediaType==="googleMaps"
aspectRatioselectAspect RatioautoRequired; Shown when hasMedia(siblingData); Options: auto (Auto), 21/9-md (21:9 on desktop, 4:3 on mobile), 21/9 (cinema - 21:9), 16/9 (video - 16:9), 4/3 (landscape photo - 4:3), 3/2 (landscape photo - 3:2), 1/1 (square - 1:1)
autoPlaycheckboxAutoplayShown when siblingData?.mediaType==="video"&&siblingData?.video&&!siblingData?.poster
controlscheckboxControlstrueShown when siblingData?.mediaType==="video"&&siblingData?.video&&!siblingData?.poster
descriptionrichTextDescription
floatradioMedia FloatleftRequired; Options: left (Left), right (Right)
imageuploadSelect imageRequired; Shown when siblingData?.mediaType==="image"; Related to uploads
labeltextLabel (optional)
mediaTyperadioMedia TypeimageRequired; Options: image (Image), video (Video), youtube (YouTube), googleMaps (Google Maps)
objectFitradioObject FitcoverShown when hasMedia(siblingData,UPLOADED_MEDIA_KEYS); Required; Options: cover (Cover), contain (Contain)
objectPositionXradioHorizontal AlignmentcenterShown when hasMedia(siblingData,UPLOADED_MEDIA_KEYS); Required; Options: left (Left), center (Center), right (Right)
objectPositionYradioVertical AlignmentcenterShown when hasMedia(siblingData,UPLOADED_MEDIA_KEYS); Required; Options: top (Top), center (Center), bottom (Bottom)
parallaxcheckboxEnable parallax effectfalseShown when hasParallaxMedia(siblingData)
posteruploadPoster image (optional)Shown when siblingData?.mediaType==="video"&&siblingData?.video||siblingData?.mediaType==="youtube"&&siblingData?.youtubeUrl; Related to uploads
preloadselectPreloadmetadataRequired; Shown when condition(siblingData); Options: metadata (Metadata — first frame only (recommended)), none (None — nothing until play), auto (Auto — download the whole video up front)
titletextTitleRequired
videouploadSelect videoRequired; Shown when siblingData?.mediaType==="video"; Related to uploads
youtubeUrltextPaste Youtube URLRequired; Shown when siblingData?.mediaType==="youtube"
zoomnumberDefault zoom14Required; Shown when siblingData?.mediaType==="googleMaps"

Aspect ratioLink to this section

The feature hero has the same aspectRatio control as the Feature block, for the identical reason — .hero-feature-media releases its child's height the same way — so the hero's existing aspectRatio select is now also offered while Hero type is Feature, not just Simple.

Video playbackLink to this section

Simple and Feature heroes with an uploaded video carry the preload control; background heroes take one image-or-video upload, expose no preload control and use metadata. See Video playback and weight.

Rendered outputLink to this section

Renders HeroSimple, HeroBackground or HeroFeature. The title renders as the page's <h1>.

ConverterLink to this section

No default editor offers them, so adding them does not change any existing block picker. Register the ones you want through customBlocks, with the built-in converters from @systhemaui/payload/lexical/convertLexicalNodesToJSX:

import { HeroSimpleBlock, HeroFeatureBlock } from '@systhemaui/payload/blocks'
import {
  heroSimpleConverter,
  heroFeatureConverter,
} from '@systhemaui/payload/lexical/convertLexicalNodesToJSX'

withSysthema(config, {
  customBlocks: [
    { type: 'block', data: HeroSimpleBlock, editor: 'root', converter: heroSimpleConverter },
    { type: 'block', data: HeroFeatureBlock, editor: 'root', converter: heroFeatureConverter },
  ],
})

The title renders as the page's <h1>, so pair a hero block with the template's Hero type: None rather than a second hero. The description is a slot-tier editor, and its blocks are tagged with that tier like any other nested editor. The converters are also built into the renderer, so client-mode live preview shows the blocks without a livePreview.clientSetup registration.

CustomizingLink to this section

Copy the hero block definition before changing its fields. Register the copy through customBlocks with an explicit editor tier and one of the exported hero converters. Keeping the existing slug replaces its converter; a distinct slug creates a separate hero option. The renderer expects the shared hero field names, and its description must remain a serialized slot editor if you reuse it.

Project converters used in client-mode preview also need browser registration through livePreview.clientSetup; see Client mode.