RootData
An object representing the root data. Similar to ComponentData
.
{
"props": {
"title": "Hello, world"
}
}
Params
Param | Example | Type | Status |
---|---|---|---|
props | props: { title: "Hello, world" } | Object | Required |
readOnly | readOnly: { title: true } | Object | - |
Required params
type
The type of the component, which tells Puck to run the render()
method for the component of the same key.
props
The props stored based on the component config
that Puck will pass to the render()
method for the component of the same key.
{
"type": "HeadingBlock",
"props": {
"id": "HeadingBlock-1234",
"title": "Hello, world"
}
}
Requires id
unless used for root
.
Optional params
readOnly
An object describing which fields are set to read-only.
{
"type": "HeadingBlock",
"props": {
"id": "HeadingBlock-1234",
"title": "Hello, world"
},
"readOnly": {
"title": true
}
}