Carousel
A horizontally scrollable row of cards.
carousel lays out a row of cards with arrow buttons to scroll between them. It’s a
library-invented block, not part of the public @slack/types package.
Fields
typestring
Always `carousel`.
stringelements?Card[]
The cards, in scroll order. Each has the same fields as a standalone card block.
Card[]A card inside elements can set its own block_id; when it doesn’t, this library generates
carousel-card-{i} so its actions still have a stable id to key off in onAction.
Examples
Several cards
The preview above scrolls through three cards. Use the arrow buttons, or drag, to move between them.
Empty carousel
An empty elements array still renders both scroll arrows, disabled since there’s nothing to scroll to.
Interactivity
Each card’s own actions dispatch the standard block_actions payload described in Card →
Interactivity. The scroll arrows are a client-side affordance only. They
don’t emit an action or appear in onAction.



