Button Actions and Interactions
Add interactivity to your cards with buttons and action handlers. The SDK automatically routes button clicks to your registered handlers.Button Types
Action Button
Triggers a callback handler when clicked.Link Button
Opens a URL when clicked (no callback handler).Handling Button Clicks
Register handlers for button actions using the action ID:Action Event
Handlers receive anActionEvent with full context:
Using Button Values
Pass data through button clicks with thevalue field:
Catch-All Handler
Handle all button clicks with a single handler:Actions Container
Buttons must be wrapped in anActions container:
Updating Messages After Actions
Edit the message that contained the button:Complete Example
Approval workflow with status updates:Button Styles
Three visual styles are available:primary- Blue/prominent (Slack: primary, Teams: accent)danger- Red/destructive (Slack: danger, Teams: destructive)default- Gray/secondary (default if not specified)
Next Steps
Modals
Open forms and dialogs from button clicks
Error Handling
Handle failures in action handlers