Skip to main content

Canvas element

This is a rich text element, compatible only with the rich_text block. It must be used within the rich_text_list, rich_text_quote, or rich_text_section block element within the rich_text block's elements array.

Fields

FieldTypeDescriptionRequired?
typeStringThe type of object; in this case, "canvas".Required
file_idStringThe ID of the canvas to link to.Required
labelStringWhat the canvas is labeled.Optional
hide_titleBooleanWhether the title should be hidden.Optional
section_idStringThe section ID.Optional
styleObjectAn object of optional boolean properties that dictate style: bold, italic, strike, highlight, client_highlight, underline, and unlink.Optional
textStringTitle of the canvas.Optional
urlStringURL of the canvas.Optional
is_skill_invocationBooleanTrue when this canvas element was inserted as a skill invocation.Optional

Example

{
"blocks": [
{
"type": "rich_text",
"elements": [
{
"type": "rich_text_section",
"elements": [
{
"type": "canvas",
"file_id": "F123ABC456"
}
]
}
]
}
]
}

View in Block Kit Builder