@slack/types / CardBlock
Interface: CardBlock
Defined in: block-kit/blocks.ts:139
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: block-kit/blocks.ts:170
Description
An array of Button elements displayed at the bottom of the card.
block_id?
optional block_id: string;
Defined in: block-kit/blocks.ts:49
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: block-kit/blocks.ts:166
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: block-kit/blocks.ts:147
Description
A top banner image for the card in the form of an ImageElement.
icon?
optional icon: ImageElement;
Defined in: block-kit/blocks.ts:151
Description
A small icon displayed next to the title and subtitle in the form of an ImageElement.
subtitle?
optional subtitle: MrkdwnElement;
Defined in: block-kit/blocks.ts:161
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: block-kit/blocks.ts:156
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: block-kit/blocks.ts:143
Description
The type of block. For a card block, type is always card.