Skip to main content

@slack/types / IconButton

Interface: IconButton

Defined in: block-kit/block-elements.ts:213

Description

An icon button to perform actions.

Extends

Properties

accessibility_label?

optional accessibility_label: string;

Defined in: block-kit/block-elements.ts:231

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: block-kit/extensions.ts:15

@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: block-kit/extensions.ts:25

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: block-kit/block-elements.ts:222

Description

The icon to show.

Example

trash

text

text: PlainTextElement;

Defined in: block-kit/block-elements.ts:227

Description

Defines an object containing some text.

See

Text object reference.


type

type: "icon_button";

Defined in: block-kit/block-elements.ts:217

Description

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

Overrides

Actionable.type


value?

optional value: string;

Defined in: block-kit/block-elements.ts:235

Description

The button value.


visible_to_user_ids?

optional visible_to_user_ids: string[];

Defined in: block-kit/block-elements.ts:239

Description

User IDs for which the icon appears.