Skip to main content

ModalBlock

Overview​

ModalBlock represents a block that displays content inside a modal dialog. It is used to present additional information, actions, or media in an overlay format.

Attributes​

id​

type: string

A unique identifier for the modal block.

type​

type: literal = 'modal'

Discriminant for this block type.

type: object (optional)

The header content of the modal, with the following structure:

  • text: string (optional)
  • format: literal = 'markdown' | 'html' (optional)

subcopy​

type: object (optional)

The subcopy content of the modal, with the following structure:

  • text: string (optional)
  • format: literal = 'markdown' | 'html' (optional)

headerPosition​

type: TextAlignment (optional)

Specifies the alignment of the header text.

subcopyPosition​

type: TextAlignment (optional)

Specifies the alignment of the subcopy text.

textColor​

type: TextColorOptions (optional)

Specifies the color of the text in the modal.

backgroundColor​

type: BackgroundColorOptions (optional)

Defines the background color of the modal.

mediaAssets​

type: Media[] (optional)

An array of media assets (images or videos) displayed in the modal.

contentIds​

type: string[] (optional)

A list of IDs referencing additional content associated with the modal.

ariaLabel​

type: string (optional)

Accessibility label for the modal.