ComponentData
An object representing an instance of a component.
{
"type": "HeadingBlock",
"props": {
"id": "HeadingBlock-1234",
"title": "Hello, world"
}
}
Params
Param | Example | Type | Status |
---|---|---|---|
type | type: "HeadingBlock" | String | Required |
props | props: { id: "12345", 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.
{
"type": "HeadingBlock",
"props": {
"id": "HeadingBlock-1234", // Required
"title": "Hello, world"
}
}
Requires a unique id
prop to be defined.
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
}
}