Skip to main content

Card block

Fields

FieldTypeDescriptionRequired?
typeStringThe type of block. For a card block, type is always card.Required
block_idStringA unique identifier for a block. If not specified, a block_id will be generated.Optional
hero_imageStringLink to the top image used on the card.Optional
iconStringLink to the small image used next to the card's title and subtitle.Optional
titleStringTitle of the card, using plain_text or mrkdwn formatting. 150 characters max.Optional
subtitleStringSubtitle of the card, using plain_text or mrkdwn formatting. 150 characters max.Optional
bodyStringContent of the card, using plain_text or mrkdwn formatting. 200 characters max.Optional
actionsStringAction buttons shown at the bottom of the card, maximum of 3 buttons. Buttons with danger style will be left-aligned, while buttons with primary or no style will be right-aligned (buttons with primary style will be furthest to the right).Optional
slack_iconSlack icon composition objectA Slack icon to be rendered next to the card's title and subtitle. Mutually exclusive with icon, that is, only one of icon & slack_icon can be present as they render in the same location on the card.Optional
subtextStringSubtext to be rendered below body of the card, using plain_text or mrkdwn formatting. Maximum 200 characters.Optional

At least one of hero_image, title, actions, or body is required.

Note that there is not currently an attribute to define the size of the card.

Example

A sample card block:

{
"blocks": [
{
"type": "card",
"icon": {
"type": "image",
"image_url": "https://picsum.photos/36/36",
"alt_text": "Icon"
},
"title": {
"type": "mrkdwn",
"text": "Lumon Industries",
"verbatim": false
},
"subtitle": {
"type": "mrkdwn",
"text": "Committed to work-life balance",
"verbatim": false
},
"hero_image": {
"type": "image",
"image_url": "https://picsum.photos/400/300",
"alt_text": "Sample hero image"
},
"body": {
"type": "mrkdwn",
"text": "Please enjoy each card equally.",
"verbatim": false
},
"actions": [
{
"type": "button",
"text": {
"type": "plain_text",
"text": "Action Button",
"emoji": false
},
"action_id": "button_action"
}
]
}
]
}

View in Block Kit Builder