import * as react_jsx_runtime from 'react/jsx-runtime'; import { ComponentPropsWithoutRef, ReactNode } from 'react'; type Element = ButtonElement | CheckboxesElement | DatePickerElement | DateTimePickerElement | EmailInputElement | FeedbackButtonsElement | FileInputElement | IconButtonElement | ImageElement | MultiStaticSelectElement | MultiExternalSelectElement | MultiUsersSelectElement | MultiConversationsSelectElement | MultiChannelsSelectElement | NumberInputElement | OverflowMenuElement | PlainTextInputElement | RadioButtonsElement | RichTextInputElement | StaticSelectElement | ExternalSelectElement | UsersSelectElement | ConversationsSelectElement | ChannelsSelectElement | TimePickerElement | UrlTextInputElement | UrlSourceElement | WorkflowButtonElement | RichTextBlockElement; type ButtonElement = { type: "button"; /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#text text object} that defines the button's text. Can only be of ***type: plain_text***. ***text*** may truncate with ~30 characters. Maximum length for the ***text*** in this field is 75 characters. */ text: TextObject<"plain_text">; /** * An identifier for this action. You can use this when you receive an interaction payload to {@link https://api.slack.com/interactivity/handling#payloads 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. */ action_id?: string; /** * A URL to load in the user's browser when the button is clicked. Maximum length for this field is 3000 characters. If you're using ***url***, you'll still receive an {@link https://api.slack.com/interactivity/handling#payloads interaction payload} and will need to {@link https://api.slack.com/interactivity/handling#acknowledgment_response send an acknowledgement response}. */ url?: string; /** * The value to send along with the {@link https://api.slack.com/interactivity/handling#payloads interaction payload}. Maximum length for this field is 2000 characters. */ value?: string; /** * Decorates buttons with alternative visual color schemes. Use this option with restraint. * * ***primary*** gives buttons a green outline and text, ideal for affirmation or confirmation actions. ***primary*** should only be used for one button within a set. * * ***danger*** gives buttons a red outline and text, and should be used when the action is destructive. Use ***danger*** even more sparingly than ***primary***. * * If you don't include this field, the default button style will be used. */ style?: Omit | undefined; /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#confirm confirm object} that defines an optional confirmation dialog after the button is clicked. */ confirm?: ConfirmDialogObject; /** * A label for longer descriptive text about a button element. This label will be read out by screen readers instead of the button {@link https://api.slack.com/reference/block-kit/composition-objects#text text object}. Maximum length for this field is 75 characters. */ accessibility_label?: string; }; type CheckboxesElement = { type: "checkboxes"; /** * An identifier for the action triggered when the checkbox group is changed. You can use this when you receive an interaction payload to {@link https://api.slack.com/interactivity/handling#payloads identify the source of the action}. Should be unique among all other ***action_id*** s in the containing block. Maximum length for this field is 255 characters. */ action_id: string; /** * An array of {@link https://api.slack.com/reference/block-kit/composition-objects#option option objects}. A maximum of 10 options are allowed. */ options: OptionObjectWithoutUrl[]; /** * An array of {@link https://api.slack.com/reference/block-kit/composition-objects#option option objects} that exactly matches one or more of the options within options. These options will be selected when the checkbox group initially loads. */ initial_options?: OptionObject[]; /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#confirm confirm object} that defines an optional confirmation dialog that appears after clicking one of the checkboxes in this element. */ confirm?: ConfirmDialogObject; /** * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***. */ focus_on_load?: boolean; }; type DatePickerElement = { type: "datepicker"; /** * An identifier for the action triggered when a menu option is selected. You can use this when you receive an interaction payload to {@link https://api.slack.com/interactivity/handling#payloads identify the source of the action}. Should be unique among all other ***action_id*** s in the containing block. Maximum length for this field is 255 characters. */ action_id: string; /** * The initial date that is selected when the element is loaded. This should be in the format ***YYYY-MM-DD***. */ initial_date?: string; /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#confirm confirm object} that defines an optional confirmation dialog that appears after a date is selected. */ confirm?: ConfirmDialogObject; /** * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***. */ focus_on_load?: boolean; /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text*** only text object} that defines the placeholder text shown on the datepicker. Maximum length for the text in this field is 150 characters. */ placeholder?: TextObject<"plain_text">; }; type DateTimePickerElement = { type: "datetimepicker"; /** * An identifier for the input value when the parent modal is submitted. You can use this when you receive a ***view_submission*** payload to {@link https://api.slack.com/surfaces/modals/using#handling-submissions identify the value of the input element}. Should be unique among all other ***action_id*** s in the containing block. Maximum length for this field is 255 characters. */ action_id: string; /** * The initial date and time that is selected when the element is loaded, represented as a UNUIX timestamp in seconds. This should be in the format of 10 digits, for example ***1628633820*** represents the date and time August 10th, 2021 at 03:17pm PST. */ initial_date_time?: number; /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#confirm confirm object} that defines an optional confirmation dialog that appears after a time is selected. */ confirm?: ConfirmDialogObject; /** * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***. */ focus_on_load?: boolean; }; type EmailInputElement = { type: "email_text_input"; /** * An identifier for the input value when the parent modal is submitted. You can use this when you receive a ***view_submission*** payload to {@link https://api.slack.com/surfaces/modals/using#handling-submissions identify the value of the input element}. Should be unique among all other ***action_id*** s in the containing block. Maximum length for this field is 255 characters. */ action_id: string; /** * The initial value in the email input when it is loaded. */ initial_value?: string; /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#dispatch_action_config dispatch configuration object} that determines when during text input the element returns a {@link https://api.slack.com/reference/interaction-payloads/block-actions block_actions payload}. */ dispatch_action_config?: DispatchActionConfigObject; /** * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***. */ focus_on_load?: boolean; /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text*** only text object} that defines the placeholder text shown in the email input. Maximum length for the text in this field is 150 characters. */ placeholder?: TextObject<"plain_text">; }; type ImageElement = { type: "image"; /** * The URL of the image to be displayed. */ image_url: string; /** * A plain-text summary of the image. This should not contain any markup. */ alt_text: string; }; type MultiStaticSelectElement = { type: "multi_static_select"; /** * An identifier for the action triggered when a menu option is selected. You can use this when you receive an interaction payload to {@link https://api.slack.com/messaging/interactivity/enabling#understanding_payloads identify the source of the action}. Should be unique among all other ***action_id***s in the containing block. Maximum length for this field is 255 characters. */ action_id: string; /** * An array of {@link https://api.slack.com/reference/messaging/composition-objects#option option objects}. Maximum number of options is 100. If ***option_groups*** is specified, this field should not be. */ options: OptionObject[]; /** * An array of {@link https://api.slack.com/reference/messaging/composition-objects#option_group option group objects}. Maximum number of option groups is 100. If ***options*** is specified, this field should not be. */ option_groups?: OptionGroupObject[]; /** * An array of {@link https://api.slack.com/reference/messaging/composition-objects#option option objects} that exactly match one or more of the options within ***options*** or ***option_groups***. These options will be selected when the menu initially loads. */ initial_options?: OptionObject[]; /** * A {@link https://api.slack.com/reference/messaging/composition-objects#confirm confirm object} that defines an optional confirmation dialog that appears before the multi-select choices are submitted. */ confirm?: ConfirmDialogObject; /** * Specifies the maximum number of items that can be selected in the menu. Minimum number is 1. */ max_selected_items?: number; /** * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***. */ focus_on_load?: boolean; /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text*** only text object} that defines the placeholder text shown on the menu. Maximum length for the text in this field is 150 characters. */ placeholder?: TextObject<"plain_text">; }; type MultiExternalSelectElement = { type: "multi_external_select"; /** * An identifier for the action triggered when a menu option is selected. You can use this when you receive an interaction payload to {@link https://api.slack.com/messaging/interactivity/enabling#understanding_payloads identify the source of the action}. Should be unique among all other ***action_id***s in the containing block. Maximum length for this field is 255 characters. */ action_id: string; /** * When the typeahead field is used, a request will be sent on every character change. If you prefer fewer requests or more fully ideated queries, use the ***min_query_length*** attribute to tell Slack the fewest number of typed characters required before dispatch. The default value is ***3***. */ min_query_length?: number; /** * An array of option objects that exactly match one or more of the options within options or option_groups. These options will be selected when the menu initially loads. */ initial_options?: OptionObject[]; /** * A {@link https://api.slack.com/reference/messaging/composition-objects#confirm confirm object} that defines an optional confirmation dialog that appears before the multi-select choices are submitted. */ confirm?: ConfirmDialogObject; /** * Specifies the maximum number of items that can be selected in the menu. Minimum number is 1. */ max_selected_items?: number; /** * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***. */ focus_on_load?: boolean; /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text*** only text object} that defines the placeholder text shown on the menu. Maximum length for the text in this field is 150 characters. */ placeholder?: TextObject<"plain_text">; }; type MultiUsersSelectElement = { type: "multi_users_select"; /** * An identifier for the action triggered when a menu option is selected. You can use this when you receive an interaction payload to {@link https://api.slack.com/messaging/interactivity/enabling#understanding_payloads identify the source of the action}. Should be unique among all other ***action_id***s in the containing block. Maximum length for this field is 255 characters. */ action_id: string; /** * An array of user IDs of any valid users to be pre-selected when the menu loads. */ initial_users?: string[]; /** * A {@link https://api.slack.com/reference/messaging/composition-objects#confirm confirm object} that defines an optional confirmation dialog that appears before the multi-select choices are submitted. */ confirm?: ConfirmDialogObject; /** * Specifies the maximum number of items that can be selected in the menu. Minimum number is 1. */ max_selected_items?: number; /** * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***. */ focus_on_load?: boolean; /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text*** only text object} that defines the placeholder text shown on the menu. Maximum length for the text in this field is 150 characters. */ placeholder?: TextObject<"plain_text">; }; type MultiConversationsSelectElement = { type: "multi_conversations_select"; /** * An identifier for the action triggered when a menu option is selected. You can use this when you receive an interaction payload to {@link https://api.slack.com/messaging/interactivity/enabling#understanding_payloads identify the source of the action}. Should be unique among all other ***action_id***s in the containing block. Maximum length for this field is 255 characters. */ action_id: string; /** * An array of one or more IDs of any valid conversations to be pre-selected when the menu loads. If ***default_to_current_conversation*** is also supplied, ***initial_conversations*** will be ignored. */ initial_conversations?: string[]; /** * Pre-populates the select menu with the conversation that the user was viewing when they opened the modal, if available. Default is ***false***. */ default_to_current_conversation?: boolean; /** * A {@link https://api.slack.com/reference/messaging/composition-objects#confirm confirm object} that defines an optional confirmation dialog that appears before the multi-select choices are submitted. */ confirm?: ConfirmDialogObject; /** * Specifies the maximum number of items that can be selected in the menu. Minimum number is 1. */ max_selected_items?: number; /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#filter_conversations filter object} that reduces the list of available conversations using the specified criteria. */ filter?: FilterObject; /** * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***. */ focus_on_load?: boolean; /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text*** only text object} that defines the placeholder text shown on the menu. Maximum length for the text in this field is 150 characters. */ placeholder?: TextObject<"plain_text">; }; type MultiChannelsSelectElement = { type: "multi_channels_select"; /** * An identifier for the action triggered when a menu option is selected. You can use this when you receive an interaction payload to {@link https://api.slack.com/messaging/interactivity/enabling#understanding_payloads identify the source of the action}. Should be unique among all other ***action_id***s in the containing block. Maximum length for this field is 255 characters. */ action_id: string; /** * An array of one or more IDs of any valid public channel to be pre-selected when the menu loads. */ initial_channels?: string[]; /** * A {@link https://api.slack.com/reference/messaging/composition-objects#confirm confirm object} that defines an optional confirmation dialog that appears before the multi-select choices are submitted. */ confirm?: ConfirmDialogObject; /** * Specifies the maximum number of items that can be selected in the menu. Minimum number is 1. */ max_selected_items?: number; /** * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***. */ focus_on_load?: boolean; /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text*** only text object} that defines the placeholder text shown on the menu. Maximum length for the text in this field is 150 characters. */ placeholder?: TextObject<"plain_text">; }; type NumberInputElement = { type: "number_input"; /** * Decimal numbers are allowed if ***is_decimal_allowed*** = ***true***, set the value to false otherwise. */ is_decimal_allowed: boolean; /** * An identifier for the input value when the parent modal is submitted. You can use this when you receive a ***view_submission*** payload to {@link https://api.slack.com/surfaces/modals/using#handling-submissions identify the value of the input element}. Should be unique among all other ***action_ids*** in the containing block. Maximum length for this field is 255 characters. */ action_id?: string; /** * The initial value in the plain-text input when it is loaded. */ initial_value?: string; /** * The minimum value, cannot be greater than ***max_value***. */ min_value?: string; /** * The maximum value, cannot be less than ***min_value***. */ max_value?: string; /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#dispatch_action_config dispatch configuration object} that determines when during text input the element returns a {@link https://api.slack.com/reference/interaction-payloads/block-actions block_actions payload}. */ dispatch_action_config?: DispatchActionConfigObject; /** * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***. */ focus_on_load?: boolean; /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text*** only text object} that defines the placeholder text shown in the number input. Maximum length for the text in this field is 150 characters. */ placeholder?: TextObject<"plain_text">; }; type OverflowMenuElement = { type: "overflow"; /** * An identifier for the action triggered when a menu option is selected. You can use this when you receive an interaction payload to {@link https://api.slack.com/interactivity/handling#payloads identify the source of the action}. Should be unique among all other ***action_id*** s in the containing block. Maximum length for this field is 255 characters. */ action_id: string; /** * An array of up to five {@link https://api.slack.com/reference/block-kit/composition-objects#option option objects} to display in the menu. */ options: OptionObject[]; /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#confirm confirm object} that defines an optional confirmation dialog that appears after a menu item is selected. */ confirm?: ConfirmDialogObject; }; type PlainTextInputElement = { type: "plain_text_input"; /** * An identifier for the input value when the parent modal is submitted. You can use this when you receive a ***view_submission*** payload to {@link https://api.slack.com/surfaces/modals/using#handling-submissions identify the value of the input element}. Should be unique among all other ***action_id*** s in the containing block. Maximum length for this field is 255 characters. */ action_id: string; /** * The initial value in the plain-text input when it is loaded. */ initial_value?: string; /** * Indicates whether the input will be a single line (***false***) or a larger textarea (***true***). Defaults to ***false*** */ multiline?: boolean; /** * The minimum length of input that the user must provide. If the user provides less, they will receive an error. Maximum value is 3000. */ min_length?: number; /** * The maximum length of input that the user can provide. If the user provides more, they will receive an error. */ max_length?: number; /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#dispatch_action_config dispatch configuration object} that determines when during text input the element returns a {@link https://api.slack.com/reference/interaction-payloads/block-actions block_actions payload}. */ dispatch_action_config?: DispatchActionConfigObject; /** * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***. */ focus_on_load?: boolean; /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text*** only text object} that defines the placeholder text shown in the plain-text input. Maximum length for the text in this field is 150 characters. */ placeholder?: TextObject<"plain_text">; }; type RadioButtonsElement = { type: "radio_buttons"; /** * An identifier for the action triggered when the radio button group is changed. You can use this when you receive an interaction payload to {@link https://api.slack.com/interactivity/handling#payloads 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. */ action_id: string; /** * An array of {@link https://api.slack.com/reference/block-kit/composition-objects#option option objects}. A maximum of 10 options are allowed. */ options: OptionObject[]; /** * An {@link https://api.slack.com/reference/messaging/composition-objects#option option object} that exactly matches one of the options within options. This option will be selected when the radio button group initially loads. */ initial_option?: OptionObject; /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#confirm confirm object} that defines an optional confirmation dialog that appears after clicking one of the radio buttons in this element. */ confirm?: ConfirmDialogObject; /** * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***. */ focus_on_load?: boolean; }; type StaticSelectElement = { type: "static_select"; /** * An identifier for the action triggered when a menu option is selected. You can use this when you receive an interaction payload to {@link https://api.slack.com/interactivity/handling#payloads identify the source of the action}. Should be unique among all other ***action_id*** s in the containing block. Maximum length for this field is 255 characters. */ action_id: string; /** * An array of {@link https://api.slack.com/reference/block-kit/composition-objects#option option objects}. Maximum number of options is 100. If option_groups is specified, this field should not be. */ options: OptionObject[]; /** * An array of {@link https://api.slack.com/reference/block-kit/composition-objects#option_group option group objects}. Maximum number of option groups is 100. If ***options*** is specified, this field should not be. */ option_groups?: OptionGroupObject[]; /** * A single option that exactly matches one of the options within {@link OptionObject options} or {@link OptionGroupObject option_groups}. This option will be selected when the menu initially loads. */ initial_option?: OptionObject | OptionGroupObject; /** * A {@link https://api.slack.com/reference/messaging/composition-objects#confirm confirm object} that defines an optional confirmation dialog that appears after a menu item is selected. */ confirm?: ConfirmDialogObject; /** * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***. */ focus_on_load?: boolean; /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text*** only text object} that defines the placeholder text shown on the menu. Maximum length for the text in this field is 150 characters. */ placeholder?: TextObject<"plain_text">; }; type ExternalSelectElement = { type: "external_select"; /** * An identifier for the action triggered when a menu option is selected. You can use this when you receive an interaction payload to {@link https://api.slack.com/interactivity/handling#payloads identify the source of the action}. Should be unique among all other ***action_id*** s in the containing block. Maximum length for this field is 255 characters. */ action_id: string; /** * A single option that exactly matches one of the options within {@link OptionObject options} or {@link OptionGroupObject option_groups}. This option will be selected when the menu initially loads. */ initial_option?: OptionObject | OptionGroupObject; /** * When the typeahead field is used, a request will be sent on every character change. If you prefer fewer requests or more fully ideated queries, use the ***min_query_length*** attribute to tell Slack the fewest number of typed characters required before dispatch. The default value is 3. */ min_query_length?: number; /** * A {@link https://api.slack.com/reference/messaging/composition-objects#confirm confirm object} that defines an optional confirmation dialog that appears after a menu item is selected. */ confirm?: ConfirmDialogObject; /** * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***. */ focus_on_load?: boolean; /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text*** only text object} that defines the placeholder text shown on the menu. Maximum length for the text in this field is 150 characters. */ placeholder?: TextObject<"plain_text">; }; type UsersSelectElement = { type: "users_select"; /** * An identifier for the action triggered when a menu option is selected. You can use this when you receive an interaction payload to {@link https://api.slack.com/interactivity/handling#payloads identify the source of the action}. Should be unique among all other ***action_id*** s in the containing block. Maximum length for this field is 255 characters. */ action_id: string; /** * The user ID of any valid user to be pre-selected when the menu loads. */ initial_user?: string; /** * A {@link https://api.slack.com/reference/messaging/composition-objects#confirm confirm object} that defines an optional confirmation dialog that appears after a menu item is selected. */ confirm?: ConfirmDialogObject; /** * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***. */ focus_on_load?: boolean; /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text*** only text object} that defines the placeholder text shown on the menu. Maximum length for the text in this field is 150 characters. */ placeholder?: TextObject<"plain_text">; /** * This is custom property for you to pass the list of people to show in the select menu. (This is not a part of the official Slack API) */ people: { id: string; name: string; image: null | string; online: boolean; sleeping: boolean; }[]; }; type ConversationsSelectElement = { type: "conversations_select"; /** * An identifier for the action triggered when a menu option is selected. You can use this when you receive an interaction payload to {@link https://api.slack.com/interactivity/handling#payloads identify the source of the action}. Should be unique among all other ***action_id*** s in the containing block. Maximum length for this field is 255 characters. */ action_id: string; /** * The ID of any valid conversation to be pre-selected when the menu loads. If ***default_to_current_conversation*** is also supplied, ***initial_conversation*** will take precedence. */ initial_conversation?: string; /** * Pre-populates the select menu with the conversation that the user was viewing when they opened the modal, if available. Default is ***false***. */ default_to_current_conversation?: boolean; /** * A {@link https://api.slack.com/reference/messaging/composition-objects#confirm confirm object} that defines an optional confirmation dialog that appears after a menu item is selected. */ confirm?: ConfirmDialogObject; /** * This field only works with menus in {@link https://api.slack.com/reference/block-kit/blocks#input input blocks} in {@link https://api.slack.com/surfaces/modals modals}. * When set to ***true***, the {@link https://api.slack.com/reference/interaction-payloads/views#view_submission view_submission payload} from the menu's parent view will contain a ***response_url***. This ***response_url*** can be used for {@link https://api.slack.com/interactivity/handling#message_responses message responses}. The target conversation for the message will be determined by the value of this select menu. */ response_url_enabled?: boolean; /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#filter_conversations filter object} that reduces the list of available conversations using the specified criteria. */ filter?: FilterObject; /** * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***. */ focus_on_load?: boolean; /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text*** only text object} that defines the placeholder text shown on the menu. Maximum length for the text in this field is 150 characters. */ placeholder?: TextObject<"plain_text">; }; type ChannelsSelectElement = { type: "channels_select"; /** * An identifier for the action triggered when a menu option is selected. You can use this when you receive an interaction payload to {@link https://api.slack.com/interactivity/handling#payloads identify the source of the action}. Should be unique among all other ***action_id*** s in the containing block. Maximum length for this field is 255 characters. */ action_id: string; /** * The ID of any valid public channel to be pre-selected when the menu loads. */ initial_channel?: string; /** * A {@link https://api.slack.com/reference/messaging/composition-objects#confirm confirm object} that defines an optional confirmation dialog that appears after a menu item is selected. */ confirm?: ConfirmDialogObject; /** * This field only works with menus in {@link https://api.slack.com/reference/block-kit/blocks#input input blocks} in {@link https://api.slack.com/surfaces/modals modals}. * When set to ***true***, the {@link https://api.slack.com/reference/interaction-payloads/views#view_submission view_submission payload} from the menu's parent view will contain a ***response_url***. This ***response_url*** can be used for {@link https://api.slack.com/interactivity/handling#message_responses message responses}. The target conversation for the message will be determined by the value of this select menu. */ response_url_enabled?: boolean; /** * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***. */ focus_on_load?: boolean; /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text*** only text object} that defines the placeholder text shown on the menu. Maximum length for the text in this field is 150 characters. */ placeholder?: TextObject<"plain_text">; }; type TimePickerElement = { type: "timepicker"; /** * An identifier for the action triggered when a time is selected. You can use this when you receive an interaction payload to {@link https://api.slack.com/interactivity/handling#payloads identify the source of the action}. Should be unique among all other ***action_id*** s in the containing block. Maximum length for this field is 255 characters. */ action_id: string; /** * The initial time that is selected when the element is loaded. This should be in the format ***HH:mm***, where ***HH*** is the 24-hour format of an hour (00 to 23) and ***mm*** is minutes with leading zeros (00 to 59), for example ***22:25*** for 10:25pm. */ initial_time?: string; /** * A {@link https://api.slack.com/reference/messaging/composition-objects#confirm confirm object} that defines an optional confirmation dialog that appears after a menu item is selected. */ confirm?: ConfirmDialogObject; /** * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***. */ focus_on_load?: boolean; /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text*** only text object} that defines the placeholder text shown on the timepicker. Maximum length for the text in this field is 150 characters. */ placeholder?: TextObject<"plain_text">; }; type UrlTextInputElement = { type: "url_text_input"; /** * An identifier for the input value when the parent modal is submitted. You can use this when you receive a ***view_submission*** payload {@link https://api.slack.com/surfaces/modals/using#handling-submissions to identify the value of the input element}. Should be unique among all other ***action_id*** s in the containing block. Maximum length for this field is 255 characters. */ action_id: string; /** * The initial value in the URL input when it is loaded. */ initial_value?: string; /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#dispatch_action_config dispatch configuration object} that determines when during text input the element returns a {@link https://api.slack.com/reference/interaction-payloads/block-actions block_actions payload}. */ dispatch_action_config?: DispatchActionConfigObject; /** * Indicates whether the element will be set to auto focus within the {@link https://api.slack.com/reference/surfaces/views view object}. Only one element can be set to ***true***. Defaults to ***false***. */ focus_on_load?: boolean; /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text*** only text object} that defines the placeholder text shown in the URL input. Maximum length for the text in this field is 150 characters. */ placeholder?: TextObject<"plain_text">; }; type FeedbackButtonsElement = { type: "feedback_buttons"; positive_button: { text: TextObject<"plain_text">; value: string; accessibility_label?: string; }; negative_button: { text: TextObject<"plain_text">; value: string; accessibility_label?: string; }; action_id?: string; }; type FileInputElement = { type: "file_input"; action_id?: string; filetypes?: string[]; max_files?: number; }; type IconButtonElement = { type: "icon_button"; icon: string; text: TextObject<"plain_text">; action_id?: string; value?: string; confirm?: ConfirmDialogObject; accessibility_label?: string; visible_to_user_ids?: string[]; }; type RichTextInputElement = { type: "rich_text_input"; action_id: string; initial_value?: RichTextBlock; dispatch_action_config?: DispatchActionConfigObject; focus_on_load?: boolean; placeholder?: TextObject<"plain_text">; }; type UrlSourceElement = { type: "url"; url: string; text: string; }; type WorkflowButtonElement = { type: "workflow_button"; text: TextObject<"plain_text">; workflow: WorkflowObject; action_id: string; style?: Omit | undefined; accessibility_label?: string; }; type TextObjectTextType = "plain_text" | "mrkdwn"; type Style = "primary" | "danger" | "confirm"; type ConfirmDialogObject = { /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text***-only text object} that defines the dialog's title. Maximum length for this field is 100 characters. */ title: TextObject<"plain_text">; /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#text text object} that defines the explanatory text that appears in the confirm dialog. Maximum length for the ***text*** in this field is 300 characters. */ text: TextObject; /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text***-only text object} to define the text of the button that confirms the action. Maximum length for the ***text*** in this field is 30 characters. */ confirm: TextObject<"plain_text">; deny: TextObject<"plain_text">; /** * Defines the color scheme applied to the confirm button. A value of danger will display the button with a red background on desktop, or red text on mobile. A value of primary will display the button with a green background on desktop, or blue text on mobile. If this field is not provided, the default value will be primary. */ style?: Style; }; type TextObject = { /** * The formatting to use for this text object. Can be one of ***plain_text*** or ***mrkdwn***. */ type: T extends void ? TextObjectTextType : T; /** * The text for the block. This field accepts any of the standard {@link https://api.slack.com/reference/surfaces/formatting text formatting markup} when ***type*** is ***mrkdwn***. The maximum length is 3000 characters. */ text: string; /** * Indicates whether emojis in a text field should be escaped into the colon emoji format. This field is only usable when ***type*** is ***plain_text***. */ emoji?: boolean; /** * When set to ***false*** (as is default) URLs will be auto-converted into links, conversation names will be link-ified, and certain mentions will be {@link https://api.slack.com/reference/surfaces/formatting#automatic-parsing automatically parsed}. Using a value of ***true*** will skip any preprocessing of this nature, although you can still include {@link https://api.slack.com/reference/surfaces/formatting#advanced manual parsing strings}. This field is only usable when ***type*** is ***mrkdwn*** */ verbatim?: boolean; }; type OptionObject = { /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#text object} that defines the text shown in the option on the menu. Overflow, select, and multi-select menus can only use ***plain_text*** objects, while radio buttons and checkboxes can use ***mrkdwn*** text objects. Maximum length for the ***text*** in this field is 75 characters. */ text: TextObject; /** * A unique string value that will be passed to your app when this option is chosen. Maximum length for this field is 75 characters. */ value: string; /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#text ***plain_text***-only text object} that defines a line of descriptive text shown below the ***text*** field beside the radio button. Maximum length for the ***text*** object within this field is 75 characters. */ description?: TextObject; /** * A URL to load in the user's browser when the option is clicked. **The url attribute is only available in** {@link https://api.slack.com/reference/block-kit/block-elements#overflow overflow menus}. Maximum length for this field is 3000 characters. If you're using ***url***, you'll still receive an {@link https://api.slack.com/interactivity/handling#payloads interaction payload} and will need to {@link https://api.slack.com/interactivity/handling#acknowledgment_response send an acknowledgement response}. */ url?: string; }; type OptionObjectWithoutUrl = Omit; type OptionGroupObject = { /** * A {@link https://api.slack.com/reference/block-kit/composition-objects#text plain_text only text object} that defines the label shown above this group of options. Maximum length for the ***text*** in this field is 75 characters. */ label: TextObject<"plain_text">; /** * An array of {@link https://api.slack.com/reference/block-kit/composition-objects#option option objects} that belong to this specific group. Maximum of 100 items. */ options: OptionObject[]; }; type DispatchActionConfigObject = { /** * An array of interaction types that you would like to receive a {@link https://api.slack.com/reference/interaction-payloads/block-actions block_actions payload} for. Should be one or both of: * ***on_enter_pressed*** — payload is dispatched when user presses the enter key while the input is in focus. Hint text will appear underneath the input explaining to the user to press enter to submit. * ***on_character_entered*** — payload is dispatched when a character is entered (or removed) in the input. */ trigger_actions_on?: string[]; }; type FilterObject = { /** * Indicates which type of conversations should be included in the list. When this field is provided, any conversations that do not match will be excluded * You should provide an array of strings from the following options: ***im***, ***mpim***, ***private***, and ***public***. The array cannot be empty. */ include?: string[]; /** * Indicates whether to exclude external {@link https://api.slack.com/enterprise/shared-channels shared channels} from conversation lists. Defaults to ***false***. */ exclude_external_shared_channels?: boolean; /** * Indicates whether to exclude bot users from conversation lists. Defaults to ***false***. */ exclude_bot_users?: boolean; }; type SlackFileObject = { /** * The url_private or permalink of the Slack file. */ url?: string; /** * Slack ID of the file. */ id?: string; }; type TriggerObject = { /** * A link trigger URL. Must be associated with a valid trigger. */ url: string; /** * An array of input parameter objects that map customizable values to workflow inputs. */ customizable_input_parameters?: { name: string; value: string; }[]; }; type WorkflowObject = { /** * A trigger object that contains information about a workflow's trigger. */ trigger: TriggerObject; }; type Block = ActionsBlock | AlertBlock | CardBlock | CarouselBlock | ContainerBlock | ContextBlock | ContextActionsBlock | DataVisualizationBlock | DividerBlock | FileBlock | HeaderBlock | ImageBlock | InputBlock | MarkdownBlock | PlanBlock | SectionBlock | TableBlock | TaskCardBlock | VideoBlock | RichTextBlock; type ActionsBlock = { /** * Available in surfaces: **Modals**, **Messages**, **Home tabs** * * * Example: {@link https://app.slack.com/block-kit-builder/T0385D58J4Q?cdn_fallback=1&force_cold_boot=1#%7B%22blocks%22:%5B%7B%22type%22:%22actions%22,%22block_id%22:%22actions1%22,%22elements%22:%5B%7B%22type%22:%22static_select%22,%22placeholder%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Which%20witch%20is%20the%20witchiest%20witch?%22%7D,%22action_id%22:%22select_2%22,%22options%22:%5B%7B%22text%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Matilda%22%7D,%22value%22:%22matilda%22%7D,%7B%22text%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Glinda%22%7D,%22value%22:%22glinda%22%7D,%7B%22text%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Granny%20Weatherwax%22%7D,%22value%22:%22grannyWeatherwax%22%7D,%7B%22text%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Hermione%22%7D,%22value%22:%22hermione%22%7D%5D%7D,%7B%22type%22:%22button%22,%22text%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Cancel%22%7D,%22value%22:%22cancel%22,%22action_id%22:%22button_1%22%7D%5D%7D%5D%7D View here} * * Docs: {@link https://api.slack.com/reference/block-kit/blocks#actions View here} * * A block that is used to hold multiple interactive {@link https://api.slack.com/reference/messaging/block-elements elements}. */ type: "actions"; /** * An array of interactive {@link https://api.slack.com/reference/messaging/block-elements elements objects} - {@link https://api.slack.com/reference/messaging/block-elements#button buttons}, {@link https://api.slack.com/reference/messaging/block-elements#select select menus}, {@link https://api.slack.com/reference/messaging/block-elements#overflow overflow menus}, or {@link https://api.slack.com/reference/messaging/block-elements#datepicker date pickers}. There is a maximum of 25 elements in each action block. */ elements: Element[]; /** * 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 {@link https://api.slack.com/interactivity/handling#payloads 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***. */ block_id?: string; }; type ContextBlock = { /** * Available in surfaces: **Modals**, **Messages**, **Home tabs** * * * Example: {@link https://app.slack.com/block-kit-builder/T0385D58J4Q#%7B%22blocks%22:%5B%7B%22type%22:%22context%22,%22elements%22:%5B%7B%22type%22:%22image%22,%22image_url%22:%22https://image.freepik.com/free-photo/red-drawing-pin_1156-445.jpg%22,%22alt_text%22:%22images%22%7D,%7B%22type%22:%22mrkdwn%22,%22text%22:%22Location:%20*Dogpatch*%22%7D%5D%7D%5D%7D View here} * * Docs: {@link https://api.slack.com/reference/block-kit/blocks#context View here} * * Displays message context, which can include both images and text. */ type: "context"; /** * An array of {@link https://api.slack.com/reference/messaging/block-elements#image image elements} and {@link https://api.slack.com/reference/messaging/composition-objects#text text objects}. Maximum number of items is 10. */ elements: (ImageElement | TextObject)[]; /** * A string acting as a unique identifier for a block. If not specified, one will be generated. 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***. */ block_id?: string; }; type DividerBlock = { /** * Available in surfaces: **Modals**, **Messages**, **Home tabs** * * * Example: {@link https://app.slack.com/block-kit-builder/T0385D58J4Q#%7B%22blocks%22:%5B%7B%22type%22:%22divider%22,%22block_id%22:%22divider1%22%7D%5D%7D View here} * * Docs: {@link https://api.slack.com/reference/block-kit/blocks#divider View here} * * A content divider, like an ***
***, to split up different blocks inside of a message. The divider block is nice and neat, requiring only a ***type***. */ type: "divider"; /** * A string acting as a unique identifier for a block. If not specified, one will be generated. 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***. */ block_id?: string; }; type FileBlock = { /** * Available in surfaces: **Messages** * * * Example: {@link https://api.slack.com/reference/block-kit/blocks#file_examples View here} * * Docs: {@link https://api.slack.com/reference/block-kit/blocks#file View here} * * Displays a {@link https://api.slack.com/messaging/files/remote remote file}. You can't add this block to app surfaces directly, but it will show up when {@link https://api.slack.com/messaging/retrieving retrieving messages} that contain remote files. * * If you want to add remote files to messages, {@link https://api.slack.com/messaging/files/remote follow our guide}. */ type: "file"; /** * The external unique ID for this file. */ external_id: string; /** * At the moment, **source*** will always be remote for a ***remote*** file. */ source: "remote"; /** * A string acting as a unique identifier for a block. If not specified, one will be generated. 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***. */ block_id?: string; }; type HeaderBlock = { /** * Available in surfaces: **Modals**, **Messages**, **Home tabs** * * * Example: {@link https://app.slack.com/block-kit-builder/T0385D58J4Q#%7B%22type%22:%22home%22,%22blocks%22:%5B%7B%22type%22:%22header%22,%22text%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Budget%20Performance%22%7D%7D,%7B%22type%22:%22divider%22%7D,%7B%22type%22:%22section%22,%22fields%22:%5B%7B%22type%22:%22mrkdwn%22,%22text%22:%22*Current%20Quarter*%5CnBudget:%20$18,000%20(ends%20in%2053%20days)%5CnSpend:%20$4,289.70%5CnRemain:%20$13,710.30%22%7D,%7B%22type%22:%22mrkdwn%22,%22text%22:%22*Top%20Expense%20Categories*%5Cn:airplane:%20Flights%20%C2%B7%2030%25%5Cn:taxi:%20Taxi%20/%20Uber%20/%20Lyft%20%C2%B7%2024%25%20%5Cn:knife_fork_plate:%20Client%20lunch%20/%20meetings%20%C2%B7%2018%25%22%7D%5D%7D,%7B%22type%22:%22context%22,%22elements%22:%5B%7B%22type%22:%22image%22,%22image_url%22:%22https://api.slack.com/img/blocks/bkb_template_images/placeholder.png%22,%22alt_text%22:%22placeholder%22%7D%5D%7D,%7B%22type%22:%22header%22,%22text%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Expenses%20Awaiting%20Your%20Approval%22%7D%7D,%7B%22type%22:%22divider%22%7D,%7B%22type%22:%22context%22,%22elements%22:%5B%7B%22type%22:%22mrkdwn%22,%22text%22:%22Submitted%20by%22%7D,%7B%22type%22:%22image%22,%22image_url%22:%22https://api.slack.com/img/blocks/bkb_template_images/profile_3.png%22,%22alt_text%22:%22Dwight%20Schrute%22%7D,%7B%22type%22:%22mrkdwn%22,%22text%22:%22*Dwight%20Schrute*%22%7D%5D%7D,%7B%22type%22:%22section%22,%22text%22:%7B%22type%22:%22mrkdwn%22,%22text%22:%22*Team%20Lunch%20(Internal)*%5CnCost:%20*$85.50USD*%5CnDate:%20*10/16/2019*%5CnService%20Provider:%20*Honest%20Sandwiches*%20%20%5CnExpense%20no.%20*%3Cfakelink.toUrl.com%7C#1797PD%3E*%22%7D,%22accessory%22:%7B%22type%22:%22image%22,%22image_url%22:%22https://api.slack.com/img/blocks/bkb_template_images/creditcard.png%22,%22alt_text%22:%22credit%20card%22%7D%7D,%7B%22type%22:%22actions%22,%22elements%22:%5B%7B%22type%22:%22button%22,%22text%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Approve%22,%22emoji%22:true%7D,%22style%22:%22primary%22,%22value%22:%22approve%22%7D,%7B%22type%22:%22button%22,%22text%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Decline%22,%22emoji%22:true%7D,%22style%22:%22danger%22,%22value%22:%22decline%22%7D,%7B%22type%22:%22button%22,%22text%22:%7B%22type%22:%22plain_text%22,%22text%22:%22View%20Details%22,%22emoji%22:true%7D,%22value%22:%22details%22%7D%5D%7D,%7B%22type%22:%22divider%22%7D,%7B%22type%22:%22context%22,%22elements%22:%5B%7B%22type%22:%22mrkdwn%22,%22text%22:%22Submitted%20by%22%7D,%7B%22type%22:%22image%22,%22image_url%22:%22https://api.slack.com/img/blocks/bkb_template_images/profile_2.png%22,%22alt_text%22:%22Pam%20Beasely%22%7D,%7B%22type%22:%22mrkdwn%22,%22text%22:%22*Pam%20Beasely*%22%7D%5D%7D,%7B%22type%22:%22section%22,%22text%22:%7B%22type%22:%22mrkdwn%22,%22text%22:%22*Flights%20to%20New%20York*%5CnCost:%20*$520.78USD*%5CnDate:%20*10/18/2019*%5CnService%20Provider:%20*Delta%20Airways*%5CnExpense%20no.%20*%3Cfakelink.toUrl.com%7C#1803PD%3E*%22%7D,%22accessory%22:%7B%22type%22:%22image%22,%22image_url%22:%22https://api.slack.com/img/blocks/bkb_template_images/plane.png%22,%22alt_text%22:%22plane%22%7D%7D,%7B%22type%22:%22actions%22,%22elements%22:%5B%7B%22type%22:%22button%22,%22text%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Approve%22,%22emoji%22:true%7D,%22style%22:%22primary%22,%22value%22:%22approve%22%7D,%7B%22type%22:%22button%22,%22text%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Decline%22,%22emoji%22:true%7D,%22style%22:%22danger%22,%22value%22:%22decline%22%7D,%7B%22type%22:%22button%22,%22text%22:%7B%22type%22:%22plain_text%22,%22text%22:%22View%20Details%22,%22emoji%22:true%7D,%22value%22:%22details%22%7D%5D%7D%5D%7D View here} * * Docs: {@link https://api.slack.com/reference/block-kit/blocks#header View here} * * A ***header*** is a plain-text block that displays in a larger, bold font. Use it to delineate between different groups of content in your app's surfaces. */ type: "header"; /** * The text for the block, in the form of a {@link https://api.slack.com/reference/messaging/composition-objects#text **plain_text** text object}. Maximum length for the ***text*** in this field is 150 characters. */ text: TextObject<"plain_text">; /** * A string acting as a unique identifier for a block. If not specified, one will be generated. 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***. */ block_id?: string; /** * Heading level. Values ***1*** through ***4*** correspond to ***H1***-***H4*** heading levels respectively and control the rendered size of the header. * * Added to Slack's `header` block schema in the 2026-03-06 Block Kit refresh ({@link https://docs.slack.dev/changelog/2026/03/06/block-kit-rich-text/ changelog}). When omitted, Slack and this renderer fall back to the pre-rollout single-size header rendering (equivalent to ***H3***). * * * Docs: {@link https://docs.slack.dev/reference/block-kit/blocks/header-block View here} */ level?: 1 | 2 | 3 | 4; }; type ImageBlock = { /** * Available in surfaces: **Modals**, **Messages**, **Home tabs** * * * Example: {@link https://app.slack.com/block-kit-builder/T0385D58J4Q#%7B%22blocks%22:%5B%7B%22type%22:%22image%22,%22title%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Please%20enjoy%20this%20photo%20of%20a%20kitten%22%7D,%22block_id%22:%22image4%22,%22image_url%22:%22http://placekitten.com/500/500%22,%22alt_text%22:%22An%20incredibly%20cute%20kitten.%22%7D%5D%7D View here} * * Docs: {@link https://api.slack.com/reference/block-kit/blocks#image View here} * * A simple image block, designed to make those cat photos really pop. */ type: "image"; /** * The URL of the image to be displayed. Maximum length for this field is 3000 characters. */ image_url?: string; /** * A Slack image file object. Either image_url or slack_file must be provided. */ slack_file?: SlackFileObject; /** Width of image in pixels (NOT PRESENT IN THE SLACK API BUT THEY ADD IT DYNAMICALLY) */ image_width?: number; /** Height of image in pixels (NOT PRESENT IN THE SLACK API BUT THEY ADD IT DYNAMICALLY) */ image_height?: number; /** Size of image in bytes (NOT PRESENT IN THE SLACK API BUT THEY ADD IT DYNAMICALLY) */ image_bytes?: number; /** An optional flag indicating that this image is a piece of a larger image. (NOT PRESENT IN THE SLACK API BUT THEY ADD IT DYNAMICALLY) */ is_animated?: boolean; /** Fallback configuration for this image. (NOT PRESENT IN THE SLACK API BUT THEY ADD IT DYNAMICALLY) */ fallback?: `${number}x${number}px image`; /** * A plain-text summary of the image. This should not contain any markup. Maximum length for this field is 2000 characters. */ alt_text: string; /** * An optional title for the image in the form of a {@link https://api.slack.com/reference/messaging/composition-objects#text text object} that can only be of ***type: plain_text***. Maximum length for the ***text*** in this field is 2000 characters. */ title?: TextObject<"plain_text">; /** * A string acting as a unique identifier for a block. If not specified, one will be generated. 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***. */ block_id?: string; }; type InputBlock = { /** * Available in surfaces: **Modals**, **Messages**, **Home tabs** * * * Example: {@link https://app.slack.com/block-kit-builder/T0385D58J4Q#%7B%22title%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Add%20info%20to%20feedback%22,%22emoji%22:true%7D,%22submit%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Save%22,%22emoji%22:true%7D,%22type%22:%22modal%22,%22blocks%22:%5B%7B%22type%22:%22input%22,%22element%22:%7B%22type%22:%22plain_text_input%22%7D,%22label%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Label%22,%22emoji%22:true%7D%7D%5D%7D View here} * * Docs: {@link https://api.slack.com/reference/block-kit/blocks#input View here} * * A block that collects information from users - it can hold a {@link https://api.slack.com/reference/block-kit/block-elements#input plain-text input element}, a {@link https://api.slack.com/reference/block-kit/block-elements#checkboxes checkbox element}, a {@link radio button element}, a {@link https://api.slack.com/reference/block-kit/block-elements#select select menu element}, a {@link https://api.slack.com/reference/block-kit/block-elements#multi_select multi-select menu element}, or a {@link https://api.slack.com/reference/block-kit/block-elements#datepicker datepicker}. * * Read our guides to collecting input {@link https://api.slack.com/surfaces/modals#gathering_input in modals} or {@link https://api.slack.com/surfaces/tabs/using#gathering_input in Home tabs} to learn how input blocks pass information to your app. */ type: "input"; /** * A label that appears above an input element in the form of a text object that must have ***type*** of ***plain_text***. Maximum length for the ***text*** in this field is 2000 characters. */ label: TextObject<"plain_text">; /** * A plain-text input element, a checkbox element, a radio button element, a select menu element, a multi-select menu element, or a datepicker. */ element: PlainTextInputElement | CheckboxesElement | RadioButtonsElement | StaticSelectElement | MultiStaticSelectElement | MultiExternalSelectElement | MultiUsersSelectElement | MultiConversationsSelectElement | MultiChannelsSelectElement | DatePickerElement | DateTimePickerElement | TimePickerElement | UsersSelectElement | ExternalSelectElement | ConversationsSelectElement | ChannelsSelectElement | EmailInputElement | UrlTextInputElement | NumberInputElement | FileInputElement | RichTextInputElement; /** * A boolean that indicates whether or not the use of elements in this block should dispatch a {@link https://api.slack.com/reference/interaction-payloads/block-actions ***block_actions*** payload}. Defaults to false. */ dispatch_action?: boolean; /** * A string acting as a unique identifier for a block. If not specified, one will be generated. Maximum length for this field is 255 characters. ***block_id*** should be unique for each message or view and each iteration of a message or view. If a message or view is updated, use a new ***block_id***. */ block_id?: string; /** * An optional hint that appears below an input element in a lighter grey. It must be a {@link https://api.slack.com/reference/messaging/composition-objects#text text object} with a ***type*** of ***plain_text***. Maximum length for the ***text*** in this field is 2000 characters. */ hint?: TextObject<"plain_text">; /** * A boolean that indicates whether the input element may be empty when a user submits the modal. Defaults to ***false***. */ optional?: boolean; }; type SectionBlock = { /** * Available in surfaces: **Modals**, **Messages**, **Home tabs** * * * Example: {@link https://app.slack.com/block-kit-builder/T0385D58J4Q#%7B%22blocks%22:%5B%7B%22type%22:%22section%22,%22text%22:%7B%22text%22:%22*Sally*%20has%20requested%20you%20set%20the%20deadline%20for%20the%20Nano%20launch%20project%22,%22type%22:%22mrkdwn%22%7D,%22accessory%22:%7B%22type%22:%22datepicker%22%7D%7D%5D%7D View here} * * Docs: {@link https://api.slack.com/reference/block-kit/blocks#section View here} * * A ***section*** is one of the most flexible blocks available - it can be used as a simple text block, in combination with text fields, or side-by-side with any of the available {@link https://api.slack.com/reference/messaging/block-elements block elements}. */ type: "section"; /** * The text for the block, in the form of a {@link https://api.slack.com/reference/messaging/composition-objects#text text object}. Maximum length for the text in this field is 3000 characters. This field is not required if a valid array of fields objects is provided instead. */ text?: TextObject; /** * A string acting as a unique identifier for a block. If not specified, one will be generated. You can use this ***block_id*** when you receive an interaction payload to {@link https://api.slack.com/interactivity/handling#payloads 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***. */ block_id?: string; /** * Required if no ***text*** is provided. An array of {@link https://api.slack.com/reference/messaging/composition-objects#text text objects}. Any text objects included with ***fields*** will be rendered in a compact format that allows for 2 columns of side-by-side text. Maximum number of items is 10. Maximum length for the ***text*** in each item is 2000 characters. {@link https://api.slack.com/tools/block-kit-builder?blocks=%5B%0A%09%7B%0A%09%09%22type%22%3A%20%22section%22%2C%0A%09%09%22text%22%3A%20%7B%0A%09%09%09%22text%22%3A%20%22A%20message%20*with%20some%20bold%20text*%20and%20_some%20italicized%20text_.%22%2C%0A%09%09%09%22type%22%3A%20%22mrkdwn%22%0A%09%09%7D%2C%0A%09%09%22fields%22%3A%20%5B%0A%09%09%09%7B%0A%09%09%09%09%22type%22%3A%20%22mrkdwn%22%2C%0A%09%09%09%09%22text%22%3A%20%22*Priority*%22%0A%09%09%09%7D%2C%0A%09%09%09%7B%0A%09%09%09%09%22type%22%3A%20%22mrkdwn%22%2C%0A%09%09%09%09%22text%22%3A%20%22*Type*%22%0A%09%09%09%7D%2C%0A%09%09%09%7B%0A%09%09%09%09%22type%22%3A%20%22plain_text%22%2C%0A%09%09%09%09%22text%22%3A%20%22High%22%0A%09%09%09%7D%2C%0A%09%09%09%7B%0A%09%09%09%09%22type%22%3A%20%22plain_text%22%2C%0A%09%09%09%09%22text%22%3A%20%22String%22%0A%09%09%09%7D%0A%09%09%5D%0A%09%7D%0A%5D Click here for an example}. */ fields?: TextObject[]; /** * One of the available {@link https://api.slack.com/reference/messaging/block-elements element objects}. */ accessory?: Element; /** * When set to true, the full text is always displayed. When false or omitted, long text may be truncated with a "see more" option. */ expand?: boolean; }; type VideoBlock = { /** * Available in surfaces: **Modals**, **Messages**, **Home tabs** * * * Example: {@link https://api.slack.com/reference/block-kit/blocks#video_examples View here} * * Docs: {@link https://api.slack.com/reference/block-kit/blocks#video View here} * * A ***video*** block is designed to embed videos in all app surfaces (e.g. link unfurls, messages, modals, App Home) — anywhere you can put blocks! To use the video block within your app, you must have the ***links.embed:write*** scope. * * Requirements * - Video blocks can only be posted by apps; users are not allowed to post embedded videos directly from Block Kit Builder. * - Your app must have the the ***links.embed:write*** scope for both user and bot tokens. * - ***video_url*** has to be included in the {@link https://api.slack.com/reference/messaging/link-unfurling#configuring_domains unfurl domains} specified in your app. * - ***video_url*** should be publicly accessible, unless the app relies on information received from the {@link https://api.slack.com/apis/connections/events-api Events API} payloads to make a decision on whether the viewer(s) of the content should have access. If so, the service could create a unique URL accessible only via Slack. * - ***video_url*** must be compatible with an embeddable iFrame. * - ***video_url*** must return a 2xx code OR 3xx with less than 5 redirects and an eventual 2xx. * - ***video_url*** must not point to any Slack-related domain. * * Constraints * - Embeddable video players only (audio-only permitted) * - Navigation, scrolling and overlays are not allowed within the iFrame. * - Interactivity (e.g. likes, comments, and reactions) are allowed within your player but shouldn't completely overlay or navigate away from the content being embedded. These interactions will be anonymous since no user data is transferred to the embedded view. * * The metadata received in the Block payload will be used to construct the description, provider, and title of the video in all clients. Developers have the flexibility to leave non-mandatory fields null and use other blocks to format this content. */ type: "video"; /** * A tooltip for the video. Required for accessibility */ alt_text: string; /** * Author name to be displayed. Must be less than 50 characters. */ author_name?: string; /** * A string acting as a unique identifier for a block. If not specified, one will be generated. 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***. */ block_id?: string; /** * Description for video in plain text format. */ description?: TextObject<"plain_text">; /** * Icon for the video provider - ex. Youtube icon */ provider_icon_url?: string; /** * The originating application or domain of the video ex. Youtube */ provider_name?: string; /** * Video title in plain text format. Must be less than 200 characters. */ title: TextObject<"plain_text">; /** * Hyperlink for the title text. Must correspond to the non-embeddable URL for the video. Must go to an HTTPS URL. */ title_url?: string; /** * The thumbnail image URL */ thumbnail_url: string; /** * The URL to be embedded. Must match any existing {@link https://api.slack.com/reference/messaging/link-unfurling#configuring_domains unfurl domains} within the app and point to a HTTPS URL. */ video_url: string; /** * This is a custom property added by slack-block-to-jsx library to more control over iframe */ iframeProps?: ComponentPropsWithoutRef<"iframe">; }; type TableBlock = { /** * Available in surfaces: **Messages** * * * Docs: {@link https://docs.slack.dev/reference/block-kit/blocks/table-block/ View here} * * A ***table*** block displays data in a structured table format. It supports up to 100 rows with 20 cells each. Only one table is allowed per message. */ type: "table"; /** * A string acting as a unique identifier for a block. If not specified, one will be generated. 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***. */ block_id?: string; /** * An array of table rows. Maximum 100 rows, each row can have up to 20 cells. */ rows: TableCell[][]; /** * Optional array to configure column behavior. Can specify alignment and text wrapping. Maximum 20 configuration items. */ column_settings?: TableColumnSetting[]; }; type TableCell = { /** * The type of cell content */ type: "raw_text"; /** * The text content of the cell */ text: string; } | RichTextBlock; type TableColumnSetting = { /** * Text alignment for the column. Defaults to left. */ align?: "left" | "center" | "right"; /** * Whether text should wrap in the column. Defaults to false. */ is_wrapped?: boolean; }; type RichTextBlock = { /** * Available in surfaces: **Modals**, **Messages**, **Home tabs** * * * Example: {@link https://app.slack.com/block-kit-builder/T01HP7H5HME#%7B%22blocks%22:%5B%7B%22type%22:%22rich_text%22,%22elements%22:%5B%7B%22type%22:%22rich_text_section%22,%22elements%22:%5B%7B%22type%22:%22text%22,%22text%22:%22Hello%20there,%20I%20am%20a%20basic%20rich%20text%20block!%22%7D%5D%7D%5D%7D%5D%7D View here} * * * Docs: {@link https://api.slack.com/reference/block-kit/blocks#rich_text View here} * * A ***rich_text*** block is a formatted, structured representation of text. It is the output of the Slack client's WYSIWYG composer, so all messages sent by end-users will have this format. You can use this block to create your own formatted text in Block Kit Builder or include user-defined formatted text in your Block Kit payload. You might encounter ***rich_text*** blocks in message payloads coming from our APIs, as a built-in type in the next-generation Slack platform, or as output of the ***rich_text_input*** block. */ type: "rich_text"; /** * A string acting as a unique identifier for a block. If not specified, one will be generated. 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***. */ block_id?: string; /** * An array of rich text objects - rich_text_section, rich_text_list, rich_text_preformatted, and rich_text_quote. See your specific desired element below for more details. */ elements: RichTextBlockElement[]; }; type ContextActionsBlock = { type: "context_actions"; elements: Element[]; block_id?: string; }; type MarkdownBlock = { type: "markdown"; text: string; block_id?: string; }; type PlanBlock = { type: "plan"; title: string; tasks?: TaskCardBlock[]; block_id?: string; }; type TaskCardBlock = { type: "task_card"; task_id: string; title: string; details?: RichTextBlock; output?: RichTextBlock; sources?: UrlSourceElement[]; status?: "pending" | "in_progress" | "complete" | "error"; block_id?: string; }; /** * Severity level for an {@link AlertBlock}. Controls the icon and color accent. */ type AlertLevel = "default" | "info" | "warning" | "error" | "success"; type AlertBlock = { /** * Available in surfaces: **Messages** * * * Docs: {@link https://docs.slack.dev/reference/block-kit/blocks/alert-block/ View here} * * An ***alert*** block displays a single-line status notification with an optional severity * level (***default***, ***info***, ***warning***, ***error***, or ***success***). Useful for * build failures, monitoring notifications, and quick status updates. */ type: "alert"; /** * A text object containing the alert's message. Maximum length for the ***text*** is 3000 * characters. Supports mrkdwn formatting. */ text: TextObject; /** * Severity level for the alert. Defaults to ***default*** when omitted. Slack renders a * matching icon and color accent for each level. */ level?: AlertLevel; /** * A string acting as a unique identifier for a block. If not specified, one will be generated. * Maximum length for this field is 255 characters. */ block_id?: string; }; /** * An image used inside a {@link CardBlock} (for the hero image or the icon slot). */ type CardImage = { /** * The URL of the image to be displayed. */ image_url?: string; /** * A Slack image file object. Either ***image_url*** or ***slack_file*** must be provided. */ slack_file?: SlackFileObject; /** * A plain-text summary of the image. Required for accessibility. */ alt_text: string; }; type CardBlock = { /** * Available in surfaces: **Messages** * * * Docs: {@link https://docs.slack.dev/reference/block-kit/blocks/card-block/ View here} * * A ***card*** block is a rich container with a title, optional subtitle and body text, * optional hero image and icon, and up to five action buttons. Cards can stand alone or be * nested inside a {@link CarouselBlock}. */ type: "card"; /** * A plain-text title for the card. Maximum length is 150 characters. */ title?: TextObject<"plain_text">; /** * A plain-text subtitle. Rendered below the title in a smaller, muted style. * Maximum length is 150 characters. */ subtitle?: TextObject<"plain_text">; /** * The card's main text. Supports mrkdwn when a {@link TextObject} of type ***mrkdwn*** is * passed. Maximum length is 200 characters (Slack truncates beyond that). */ body?: TextObject; /** * Large header image rendered above the title. Matches the {@link ImageBlock} element shape. */ hero_image?: CardImage; /** * Small icon rendered next to the title (e.g. an app logo). */ icon?: CardImage; /** * An array of up to 5 button elements. Rendered as a row of buttons below the card body. */ actions?: ButtonElement[]; /** * A string acting as a unique identifier for a block. If not specified, one will be generated. * Maximum length for this field is 255 characters. */ block_id?: string; }; type CarouselBlock = { /** * Available in surfaces: **Messages** * * * Docs: {@link https://docs.slack.dev/reference/block-kit/blocks/carousel-block/ View here} * * A ***carousel*** block displays a horizontally-scrollable gallery of 1–10 cards. * Ideal for product listings, search results, and "pick one of these" selection flows. */ type: "carousel"; /** * An array of {@link CardBlock} entries. Minimum 1, maximum 10. */ elements: CardBlock[]; /** * A string acting as a unique identifier for a block. If not specified, one will be generated. * Maximum length for this field is 255 characters. */ block_id?: string; }; type ContainerBlock = { /** * Available in surfaces: **Messages** * * * Docs: {@link https://docs.slack.dev/reference/block-kit/blocks/container-block View here} * * Changelog: {@link https://docs.slack.dev/changelog/2026/06/29/block-kit-container-block View here} * * A ***container*** block is a general-purpose wrapper that groups child blocks together * with an optional title, subtitle and icon, a configurable ***width***, and optional * collapse/expand behavior. */ type: "container"; /** * A plain-text title for the container, in the form of a {@link TextObject} of type * ***plain_text***. Maximum length is 150 characters. * * Note: Slack's reference docs type this (and ***subtitle***) as a string, but the API * actually expects a ***plain_text*** text object. */ title: TextObject<"plain_text">; /** * An optional subtitle rendered below the title in a smaller, muted style. A * {@link TextObject} of type ***plain_text*** or ***mrkdwn***. Maximum length is 150 characters. */ subtitle?: TextObject; /** * An optional icon ({@link ImageElement}) rendered next to the title. */ icon?: ImageElement; /** * The child blocks rendered inside the container. Maximum of 10 blocks. */ child_blocks: Block[]; /** * Controls the rendered width of the container. Defaults to ***standard***. */ width?: "narrow" | "standard" | "wide" | "full"; /** * When true, the container renders a clickable header that collapses and expands its * content. Defaults to ***false***. */ is_collapsible?: boolean; /** * When ***is_collapsible*** is true, controls whether the container starts collapsed. * Defaults to ***false***. */ default_collapsed?: boolean; /** * A string acting as a unique identifier for a block. If not specified, one will be generated. * Maximum length for this field is 255 characters. */ block_id?: string; }; /** * A single ⟨label, value⟩ pair plotted on a cartesian chart (line, bar, or area). */ type DataVizDataPoint = { /** * The category this point belongs to. Matches an entry in * {@link DataVizAxisConfig.categories}. */ label: string; /** * The numeric value for this point. May be negative. */ value: number; }; /** * A named collection of {@link DataVizDataPoint data points} rendered as one line, * one set of bars, or one filled area. The ***name*** is shown in the chart legend. */ type DataVizSeries = { /** * The series name, shown in the chart legend. */ name: string; /** * The data points for this series — typically one per category. */ data: DataVizDataPoint[]; }; /** * Axis configuration for cartesian charts (***line***, ***bar***, ***area***). Pie charts * do not use this object. */ type DataVizAxisConfig = { /** * The ordered category labels rendered along the X axis. */ categories?: string[]; /** * A label for the X axis. */ x_label?: string; /** * A label for the Y axis. */ y_label?: string; }; /** * A single slice of a pie chart. */ type DataVizSegment = { /** * The segment name, shown in the legend and used to compute its percentage. */ label: string; /** * The segment value. Percentages are computed from the sum of all segment values. */ value: number; }; /** * A ***line***, ***bar***, or ***area*** chart. These plot one or more {@link DataVizSeries series} * against a shared set of categories described by {@link DataVizAxisConfig axis_config}. */ type DataVizCartesianChart = { type: "line" | "bar" | "area"; /** * The series to plot. Each series is drawn in the next color from the palette and listed * in the legend. */ series: DataVizSeries[]; /** * Axis configuration — categories and X / Y axis labels. */ axis_config?: DataVizAxisConfig; }; /** * A ***pie*** chart. Pie charts render a set of {@link DataVizSegment segments} and do not use * ***series*** or ***axis_config***. */ type DataVizPieChart = { type: "pie"; /** * The pie segments. Each segment's percentage is computed from the sum of all values. */ segments: DataVizSegment[]; }; /** * The chart definition for a {@link DataVisualizationBlock}. The shape depends on the chart * ***type***: ***line*** / ***bar*** / ***area*** use {@link DataVizCartesianChart}, while ***pie*** * uses {@link DataVizPieChart}. */ type DataVizChart = DataVizCartesianChart | DataVizPieChart; type DataVisualizationBlock = { /** * Available in surfaces: **Messages** * * * Docs: {@link https://docs.slack.dev/reference/block-kit/blocks/data-visualization-block View here} * * A ***data_visualization*** block displays data visually as a ***pie***, ***bar***, ***area***, * or ***line*** chart. Line, bar, and area charts plot one or more {@link DataVizSeries series} * against a shared set of categories; pie charts render a set of {@link DataVizSegment segments}. * * Added to Block Kit in Slack's 2026-06-16 release * ({@link https://docs.slack.dev/changelog/2026/06/16/block-kit-data-visualization-block changelog}). */ type: "data_visualization"; /** * A plain-text title rendered above the chart (as an ***h3***). */ title?: string; /** * The chart definition. The shape depends on ***chart.type***. */ chart: DataVizChart; /** * A string acting as a unique identifier for a block. If not specified, one will be generated. * Maximum length for this field is 255 characters. */ block_id?: string; }; type RichTextBlockSubElement = RichTextList | RichTextPreformatted | RichTextQuote | RichTextSection; type RichTextList = { type: "rich_text_list"; style: "bullet" | "ordered"; /** * The number of spaces to indent this block. It must be a number between 0 and 8. */ indent?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; offset?: number; /** * 0 or 1 (default 0) - if 1, a border is drawn on the left side of the block. */ border?: 0 | 1; elements: RichTextSection[]; }; type RichTextPreformatted = { type: "rich_text_preformatted"; elements: RichTextSectionElement[]; /** * 0 or 1 (default 0) - if 1, a border is drawn on the left side of the block. */ border?: 0 | 1; /** * Programming language for syntax highlighting (e.g., "python", "javascript", "json"). */ language?: string; }; type RichTextQuote = { type: "rich_text_quote"; elements: RichTextSectionElement[]; /** * 0 or 1 (default 0) - if 1, a border is drawn on the left side of the block. */ border?: 0 | 1; }; type RichTextSection = { type: "rich_text_section"; elements: RichTextSectionElement[]; }; type RichTextBlockElement = RichTextList | RichTextPreformatted | RichTextQuote | RichTextSection; type RichTextSectionElement = RichTextSectionText | RichTextSectionChannel | RichTextSectionUser | RichTextSectionEmoji | RichTextSectionLink | RichTextSectionUsergroup | RichTextSectionBroadcast | RichTextSectionDate | RichTextSectionColor; type RichTextSectionDate = { type: "date"; timestamp: number; format: string; style?: RichTextSectionElementStyleCode; }; type RichTextSectionText = { type: "text"; text: string; style?: RichTextSectionElementStyleCode; }; type RichTextSectionChannel = { type: "channel"; channel_id: string; style?: RichTextSectionElementStyle; }; type RichTextSectionUser = { type: "user"; user_id: string; style?: RichTextSectionElementStyle; }; type RichTextSectionEmoji = { type: "emoji"; /** * Name of the emoji, e.g. smiley, sparkles, grinning_face. */ name: string; /** * hyphen-delineated list of Unicode code points * */ unicode?: string; /** * included only for single-color skintone emojis (not compound emojis) * */ skin_tone?: 1 | 2 | 3 | 4 | 5 | 6; }; type RichTextSectionLink = { type: "link"; url: string; text?: string; unsafe?: boolean; style?: RichTextSectionElementStyleCode; }; type RichTextSectionUsergroup = { type: "usergroup"; usergroup_id: string; style?: RichTextSectionElementStyle; }; type RichTextSectionBroadcast = { type: "broadcast"; range: "channel" | "here" | "everyone"; style?: RichTextSectionElementStyleCode; }; type RichTextSectionElementStyle = { bold?: boolean; italic?: boolean; strike?: boolean; underline?: boolean; highlight?: boolean; client_highlight?: boolean; unlink?: boolean; }; type RichTextSectionElementStyleCode = { code?: boolean; bold?: boolean; italic?: boolean; strike?: boolean; underline?: boolean; }; type RichTextSectionColor = { type: "color"; value: string; style?: RichTextSectionElementStyle; }; type User = { id: string; name: string; }; type UserWithStyle = User & { style?: RichTextSectionUser["style"]; }; type Channel = { id: string; name: string; }; type ChannelWithStyle = Channel & { style?: RichTextSectionChannel["style"]; }; type UserGroup = { id: string; name: string; }; type UserGroupWithStyle = UserGroup & { style?: RichTextSectionUsergroup["style"]; }; type Emoji = { name: string; unicode?: string; skin_tone?: 1 | 2 | 3 | 4 | 5 | 6; }; type LinkInput = { href: string; children: ReactNode; className: string; target?: "_blank" | "_self" | "_parent" | "_top"; rel?: string; }; type Hooks = { user?: (data: UserWithStyle) => ReactNode; channel?: (data: ChannelWithStyle) => ReactNode; usergroup?: (data: UserGroupWithStyle) => ReactNode; atChannel?: (style?: RichTextSectionBroadcast["style"]) => ReactNode; atEveryone?: (style?: RichTextSectionBroadcast["style"]) => ReactNode; atHere?: (style?: RichTextSectionBroadcast["style"]) => ReactNode; /** * The hook to replace emojis with custom components * @param data - the emoji object * @param parse - fallback function for default emoji parsing * @returns the custom emoji component */ emoji?: (data: Emoji, parse: (data: Emoji) => string) => ReactNode; date?: (data: { timestamp: string; format: string; link: string | null; fallback: string; }) => ReactNode; /** * * This hook allows you to replace the anchor (a) tag with your own wrapper. It gets applied to rich_text_section links, links in mrkdown, slack date optional links, and video block title URLs. */ link?: (input: LinkInput) => ReactNode; }; type GlobalStore = { users: User[]; channels: Channel[]; user_groups: UserGroup[]; hooks: Hooks; setUsers: (users: User[]) => void; setChannels: (channels: Channel[]) => void; setUserGroups: (userGroups: UserGroup[]) => void; setHooks: (hooks: Hooks) => void; }; type Props = { /** * Theme mode for the component. If not specified, system preference is used. */ theme?: "light" | "dark"; /** * Show a link to open the message in the Slack Block Kit Builder, for debugging purposes. Defaults to false. */ showBlockKitDebug?: boolean; blocks: Block[]; logo: string; name: string; time?: Date; className?: string; style?: React.CSSProperties; unstyled?: boolean; data?: { users?: GlobalStore["users"]; channels?: GlobalStore["channels"]; user_groups?: GlobalStore["user_groups"]; }; hooks?: GlobalStore["hooks"]; /** * If true, the header and the container which wraps the message will be removed and only the slack blocks will be returned. */ withoutWrapper?: boolean; }; type MessageProps = Props; declare const Message: (props: Props) => react_jsx_runtime.JSX.Element; export { type ActionsBlock, type AlertBlock, type AlertLevel, type Block, type ButtonElement, type CardBlock, type CardImage, type CarouselBlock, type ChannelsSelectElement, type CheckboxesElement, type ConfirmDialogObject, type ContainerBlock, type ContextActionsBlock, type ContextBlock, type ConversationsSelectElement, type DataVisualizationBlock, type DataVizAxisConfig, type DataVizCartesianChart, type DataVizChart, type DataVizDataPoint, type DataVizPieChart, type DataVizSegment, type DataVizSeries, type DatePickerElement, type DateTimePickerElement, type DispatchActionConfigObject, type DividerBlock, type Element, type EmailInputElement, type ExternalSelectElement, type FeedbackButtonsElement, type FileBlock, type FileInputElement, type FilterObject, type HeaderBlock, type IconButtonElement, type ImageBlock, type ImageElement, type InputBlock, type MarkdownBlock, Message, type MessageProps, type MultiChannelsSelectElement, type MultiConversationsSelectElement, type MultiExternalSelectElement, type MultiStaticSelectElement, type MultiUsersSelectElement, type NumberInputElement, type OptionGroupObject, type OptionObject, type OptionObjectWithoutUrl, type OverflowMenuElement, type PlainTextInputElement, type PlanBlock, type RadioButtonsElement, type RichTextBlock, type RichTextBlockElement, type RichTextBlockSubElement, type RichTextInputElement, type RichTextList, type RichTextPreformatted, type RichTextQuote, type RichTextSection, type RichTextSectionBroadcast, type RichTextSectionChannel, type RichTextSectionColor, type RichTextSectionDate, type RichTextSectionElement, type RichTextSectionElementStyle, type RichTextSectionElementStyleCode, type RichTextSectionEmoji, type RichTextSectionLink, type RichTextSectionText, type RichTextSectionUser, type RichTextSectionUsergroup, type SectionBlock, type SlackFileObject, type StaticSelectElement, type Style, type TableBlock, type TableCell, type TableColumnSetting, type TaskCardBlock, type TextObject, type TextObjectTextType, type TimePickerElement, type TriggerObject, type UrlSourceElement, type UrlTextInputElement, type UsersSelectElement, type VideoBlock, type WorkflowButtonElement, type WorkflowObject };