Feedback buttons element
Buttons to indicate positive or negative feedback, shown as a thumbs up and a thumbs down.
| Type | feedback_buttons |
| Available in | Messages |
| Works in blocks | Context actions block |
Both positive_button and negative_button take these fields:
| Field | Type | Description | Required? |
|---|---|---|---|
text |
Text object | A plain_text text object that names the button. Maximum length for the text in this field is 75 characters. |
Required |
value |
String | The value to send along with the interaction payload. Maximum length is 2000 characters. | Required |
accessibility_label |
String | A label read out by screen readers instead of text. Maximum length is 75 characters. |
Optional |
Pressing one sends your app a block_actions payload whose value is the pressed button’s value:
{ "type": "feedback_buttons", "action_id": "summary_feedback", "block_id": "pipeline_summary_feedback", "value": "summary_helpful", "action_ts": "1793786400.000000"}The pressed thumb stays highlighted for that reader. See the button element for the rest of the payload.
Fields
Section titled “Fields”| Field | Type | Description | Required? |
|---|---|---|---|
type |
String | The type of element. In this case type is always feedback_buttons. |
Required |
positive_button |
Object | A button to indicate positive feedback. See the button fields above. | Required |
negative_button |
Object | A button to indicate negative feedback. See the button fields above. | Required |
action_id |
String | An identifier for the action triggered when one of the buttons is pressed. 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 is 255 characters. If you leave it out, Repzo generates one. |
Optional |
Examples
Section titled “Examples”Feedback buttons under a reply
Section titled “Feedback buttons under a reply”
{ "blocks": [ { "type": "section", "text": { "type": "mrkdwn", "text": "*Pipeline this week*\n• 14 open deals worth *$212,000*\n• 3 deals moved to *Negotiation*\n• 2 deals have had no activity for 14 days" } }, { "type": "context_actions", "block_id": "pipeline_summary_feedback", "elements": [ { "type": "feedback_buttons", "action_id": "summary_feedback", "positive_button": { "text": { "type": "plain_text", "text": "Helpful" }, "value": "summary_helpful", "accessibility_label": "Mark this summary as helpful" }, "negative_button": { "text": { "type": "plain_text", "text": "Not helpful" }, "value": "summary_not_helpful", "accessibility_label": "Mark this summary as not helpful" } } ] } ]}