Skip to Content
BannersImageBlockBanner

ImageBlockBanner

Single image block with sizing and object-fit options.

Includes the common banner props.

Image block preview

Props

id
string
required

CMS id.

imagerequired

Image to render.

isFullsize
boolean
required

If true, render full width.

objectFit
'cover' | 'contain' | 'fill' | 'none'
required

CSS object-fit behavior.

maxHeight
Maybe<string | number>

Optional max height (CSS value or number interpreted by renderer).

Example

const banner: ImageBlockBanner = { typename: BannerTypename.ImageBlock, id: 'b_123', title: null, titleTag: 'h2', titleAlign: 'left', cssId: null, cssClasses: null, image: { id: 'img1', name: 'Image', imageRights: null, file: {} as any, mobileFile: null, alt: 'Alt', breakpoint: null, cars: [] }, isFullsize: false, objectFit: 'cover', maxHeight: null };
Last updated on