Skip to main content

@slack/web-api / IconButton

Interface: IconButton

Defined in: packages/types/dist/block-kit/block-elements.d.ts:204

Description​

An icon button to perform actions.

See​

Icon button element reference.

Extends​

Properties​

accessibility_label?​

accessibility_label?: string;

Defined in: packages/types/dist/block-kit/block-elements.d.ts:222

Description​

A label for longer descriptive text about a button element. This label will be read out by screen readers instead of the button text object. Maximum length for this field is 75 characters.


action_id?​

action_id?: string;

Defined in: packages/types/dist/block-kit/extensions.d.ts:12

@description: An identifier for this action. You can use this when you receive an interaction payload to identify the source of the action. Should be unique among all other action_ids in the containing block. Maximum length for this field is 255 characters.

Inherited from​

Actionable.action_id


confirm?​

confirm?: ConfirmationDialog;

Defined in: packages/types/dist/block-kit/extensions.d.ts:21

Description​

A Confirm object that defines an optional confirmation dialog after the element is interacted with.

Inherited from​

Confirmable.confirm


icon​

icon: string;

Defined in: packages/types/dist/block-kit/block-elements.d.ts:213

Description​

The icon to show.

Example​

trash

text​

text: PlainTextElement;

Defined in: packages/types/dist/block-kit/block-elements.d.ts:218

Description​

Defines an object containing some text.

See​

Text object reference.


type​

type: "icon_button";

Defined in: packages/types/dist/block-kit/block-elements.d.ts:208

Description​

The type of element. In this case type is always icon_button.

Overrides​

Actionable.type


value?​

value?: string;

Defined in: packages/types/dist/block-kit/block-elements.d.ts:226

Description​

The button value.


visible_to_user_ids?​

visible_to_user_ids?: string[];

Defined in: packages/types/dist/block-kit/block-elements.d.ts:230

Description​

User IDs for which the icon appears.