Skip to main content

@slack/web-api / IconButton

Interface: IconButton

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

Description​

An icon button to perform actions.

See​

Icon button element reference.

Extends​

Properties​

accessibility_label?​

optional accessibility_label?: string;

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

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?​

optional 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?​

optional 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:199

Description​

The icon to show.

Example​

trash

text​

text: PlainTextElement;

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

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:194

Description​

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

Overrides​

Actionable.type


value?​

optional value?: string;

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

Description​

The button value.


visible_to_user_ids?​

optional visible_to_user_ids?: string[];

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

Description​

User IDs for which the icon appears.