Skip to content

MixedBlockSchema

const MixedBlockSchema: z.ZodType<any>

Defined in: packages/core/src/schemas/page.schema.ts:86

Mixed block for combining multiple block types.

MixedBlock allows you to create complex layouts by combining content, map, and scrollytelling blocks. Uses z.lazy() for recursion.

Layout Options:

  • row - Horizontal layout (default)
  • column - Vertical layout
  • grid - CSS Grid layout

Row Layout

- type: mixed
layout: row
blocks:
- type: content
content:
- h2: [{ str: "Left Column" }]
- type: map
id: side-map
config:
center: [0, 0]
zoom: 2
mapStyle: "..."

Grid Layout

- type: mixed
layout: grid
style: "grid-template-columns: repeat(2, 1fr); gap: 20px;"
blocks:
- type: content
content: [...]
- type: content
content: [...]
- type: map
id: map1
config: {...}
- type: map
id: map2
config: {...}

Nested Mixed Blocks

- type: mixed
layout: column
blocks:
- type: content
content: [...]
- type: mixed
layout: row
blocks:
- type: map
id: left-map
config: {...}
- type: map
id: right-map
config: {...}