Data
An object produced by Puck describing the shape of content.
{
"content": [
{
"type": "HeadingBlock",
"props": {
"id": "HeadingBlock-1234",
"title": "Hello, world"
}
}
],
"root": { "props": { "title": "Puck Example" } },
"zones": {}
}
Params
Param | Example | Type | Status |
---|---|---|---|
content | content: [] | ComponentData[] | Required |
root | root: { props: { title: "My page" } } | RootData | Required |
zones | zones: { "HeadingBlock-123:zone": [] } | Object | - |
content
An array of ComponentData objects representing the component instances in the default content region.
{
"content": [
{
"type": "HeadingBlock",
"props": {
"id": "HeadingBlock-1234",
"title": "Hello, world"
}
}
],
"root": {},
"zones": {}
}
root
An object describing data for the root
config. An instance of RootData
.
{
"content": [],
"root": {
"props": {
"title": "My page"
}
},
"zones": {}
}
zones
💡
This parameter will soon be deprecated, as DropZones have been replaced by
slot
fields. For migration notes, see
these docs.
An object describing nested content regions for each DropZone.
zones[zoneKey]
An array of ComponentData objects representing the components instances in a particular DropZone.
zoneKey
is a compound of the component id
and DropZone zone
.
{
"content": [],
"root": {},
"zones": {
"HeadingBlock-1234:my-content": [
{
"type": "HeadingBlock",
"props": {
"id": "HeadingBlock-1234",
"title": "Hello, world"
}
}
]
}
}