Skip to content
Block Kit for React
Esc
↑↓navigate↵open⌘Jpreview
On this page

Card block

A bordered card with an icon, title, subtitle, hero image, body text, and actions.

card lays out a small piece of content (an icon or image, a title and subtitle, a hero image, body text, and buttons) inside a bordered box. It’s a library-invented block, not part of the public @slack/types package; use it standalone or as an item inside a carousel.

Your AppAPP
Sample hero image
Icon
Sample Card Title
This is a subtitle
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
onActionInteract with the preview.

Fields

PropType
typestring

Always card.

Typestring
icon?{ type: "image"; image_url: string; alt_text?: string }

A 36×36 rounded icon, left of the title and subtitle. Takes precedence over slack_icon.

Type{ type: "image"; image_url: string; alt_text?: string }
slack_icon?{ type: "icon"; name: string }

One of Slack's icons, by name. rocket, calendar, bug, lightbulb, star-filled and warning are drawn with Slack's own glyphs; any other name shows a neutral badge with the icon's name in a tooltip.

Type{ type: "icon"; name: string }
title?PlainTextElement | MrkdwnElement

The card's bold title, cut to one line after its last whole word that fits.

TypePlainTextElement | MrkdwnElement
subtitle?PlainTextElement | MrkdwnElement

Muted text under the title, cut to one line after its last whole word that fits.

TypePlainTextElement | MrkdwnElement
hero_image?{ type: "image"; image_url: string; alt_text?: string }

A full-width image above the header.

Type{ type: "image"; image_url: string; alt_text?: string }
body?PlainTextElement | MrkdwnElement

The card's main text.

TypePlainTextElement | MrkdwnElement
subtext?PlainTextElement | MrkdwnElement

Fine print below the body.

TypePlainTextElement | MrkdwnElement
actions?Element[]

Buttons and other interactive elements, rendered along the bottom of the card.

TypeElement[]
block_id?string

A unique identifier, up to 255 characters. Actions from the card's buttons carry it as their block_id.

Typestring

Examples

With and without a hero image

Your AppAPP
Sample hero image
Icon
Sample Card Title
This is a subtitle
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Your AppAPP
Icon
Sample Card Title
This is a subtitle
Lorem ipsum dolor sit amet, consectetur adipiscing elit.

With and without an icon

Your AppAPP
Icon
Sample Card Title
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Your AppAPP
Sample Card Title
This is a subtitle
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Your AppAPP
Sample hero image
Sample Card Title
This is a subtitle
Lorem ipsum dolor sit amet, consectetur adipiscing elit.

With and without a subtitle

Your AppAPP
Icon
Sample Card Title
Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Dropping subtitle centers a lone title on the icon instead of stacking the two.

Subtext and multiple actions

Your AppAPP
Sample Card Title
This is a subtitle
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
This is subtext that appears below the body
onActionInteract with the preview.

Slack orders a card’s buttons by style, regardless of where they appear in actions: danger buttons first, then default buttons and finally primary ones. Buttons with the same style keep their order from actions. With three buttons, the danger ones sit on the left and the rest on the right; with one or two, all of them sit together on the right.

Interactivity

Each entry in actions is a standard interactive element, most often a button, and dispatches Slack’s block_actions payload the same way an actions block does. Click a button in any preview above and check the action log: onAction receives

{
  "type": "button",
  "action_id": "button_action",
  "block_id": "<the card's block_id>",
  "text": { "type": "plain_text", "text": "Action Button", "emoji": false },
  "value": "…"
}

alongside the full block_actions payload your app’s request URL would receive.

Last updated on