Exported types
All types ship from the package entry. Payload shapes extend Slack's official
@slack/types definitions, so payloads typed for the Slack SDK type-check
against the renderer without conversion.
Payloads
| Type | Shape |
|---|---|
BlockKitInput | Everything <BlockKit /> accepts: BlockKitData, a JSON string, or unvalidated arrays/objects |
BlockKitData | readonly RenderableBlock[] | BlockKitPayload; the validated form returned by parseBlockKitData |
BlockKitPayload | { readonly blocks: readonly RenderableBlock[] } |
RenderableBlock | Union of every supported block type |
BlockKitSurface | "message" | "modal" | "home" |
BlockKitTheme | "light" | "dark" |
Use satisfies to keep literal payloads checked while preserving their
inferred shape:
import type { BlockKitData } from "react-blockkit";
export const payload = {
blocks: [{ type: "section", text: { type: "mrkdwn", text: "Typed end to end." } }],
} satisfies BlockKitData;Per-block data types
Every block type has a corresponding …Data type, the exact shape its
component accepts: ActionsBlockData, AlertBlockData, CardBlockData,
CarouselBlockData, ContainerBlockData, ContextBlockData,
ContextActionsBlockData, DataTableBlockData, DataVisualizationBlockData,
DividerBlockData, FileBlockData, HeaderBlockData, ImageBlockData,
InputBlockData, MarkdownBlockData, PlanBlockData, RichTextBlockData,
SectionBlockData, TableBlockData, TaskCardBlockData, and
VideoBlockData.
Element and text-object shapes follow the same pattern:
ButtonElementData, ImageElementData, InteractiveElementData,
OptionData, and TextObjectData. All of these are deeply readonly.
Interactions and resolvers
| Type | Shape |
|---|---|
BlockKitAction | { actionId, type, blockId?, value?, values? }; see Handling actions |
BlockKitResolvers | Optional user, channel, usergroup, team, emoji, and date functions; see Resolvers and mentions |
Errors and tokens
| Type | Shape |
|---|---|
BlockKitInvariantCode | Union of the stable error codes listed in the validation reference |
BlockKitInvariantDetails | { code, path }; the constructor details for BlockKitInvariantError |
MrkdwnToken | Discriminated union produced by tokenizeMrkdwn |
Component props
Each component exports its props interface: BlockKitProps,
BlockKitProviderProps, BlockProps, ButtonElementProps,
ImageElementProps, InputElementProps, InteractiveElementProps,
OverflowElementProps, SelectElementProps, TableCellProps,
MarkdownProps, MrkdwnProps, RichTextProps, and TextProps.
Re-exports from @slack/types
For convenience, commonly used SDK types are re-exported unchanged:
ActionsBlock, AlertBlock, Button, Checkboxes, ContextActionsBlock,
ContextBlock, DividerBlock, FileBlock, ImageBlock, ImageElement,
InputBlock, MarkdownBlock, Option, PlainTextElement, PlanBlock,
RichTextElement, SectionBlock, TaskCardBlock, TextObject, and
VideoBlock.