@slack/web-api / CardBlock
Interface: CardBlock
Defined in: packages/types/dist/block-kit/blocks.d.ts:70
Description
A rich display block for presenting structured content such as recommendations, results, or work items.
At least one of hero_image, title, actions, or body must be provided.
See
Extends
Properties
actions?
optional actions: Button[];
Defined in: packages/types/dist/block-kit/blocks.d.ts:101
Description
An array of Button elements displayed at the bottom of the card.
block_id?
optional block_id: string;
Defined in: packages/types/dist/block-kit/blocks.d.ts:15
Description
A string acting as a unique identifier for a block. If not specified, a block_id will be generated.
You can use this block_id when you receive an interaction payload to
identify the source of the action.
Maximum length for this field is 255 characters. block_id should be unique for each message and each iteration of
a message. If a message is updated, use a new block_id.
Inherited from
body?
optional body: MrkdwnElement;
Defined in: packages/types/dist/block-kit/blocks.d.ts:97
Description
The body text of the card in the form of a MrkdwnElement. Maximum length for the text in this field is 200 characters.
hero_image?
optional hero_image: ImageElement;
Defined in: packages/types/dist/block-kit/blocks.d.ts:78
Description
A top banner image for the card in the form of an ImageElement.
icon?
optional icon: ImageElement;
Defined in: packages/types/dist/block-kit/blocks.d.ts:82
Description
A small icon displayed next to the title and subtitle in the form of an ImageElement.
subtitle?
optional subtitle: MrkdwnElement;
Defined in: packages/types/dist/block-kit/blocks.d.ts:92
Description
The subtitle of the card in the form of a MrkdwnElement. Maximum length for the text in this field is 150 characters.
title?
optional title: MrkdwnElement;
Defined in: packages/types/dist/block-kit/blocks.d.ts:87
Description
The title of the card in the form of a MrkdwnElement. Maximum length for the text in this field is 150 characters.
type
type: "card";
Defined in: packages/types/dist/block-kit/blocks.d.ts:74
Description
The type of block. For a card block, type is always card.