VXIL
Interactions

Buttons

Define clickable button options on bot messages

When to use this

Offer explicit choices like Yes and No in message UI.

Component Schema

FieldTypeRequiredNotes
type"button"YesComponent type
labelstringYes1-80 chars
style`"primary""secondary""success"
custom_idstringYesReturned in click event
disabledbooleanNoOptional state

Layout Rules

  • Max 5 buttons per action row
  • Max 5 rows per message
  • custom_id must be unique within a message

Example Payload Fragment

{
  "components": [
    {
      "type": "action_row",
      "components": [
        { "type": "button", "label": "Yes", "style": "success", "custom_id": "poll_yes" },
        { "type": "button", "label": "No", "style": "danger", "custom_id": "poll_no" }
      ]
    }
  ]
}

Interaction Event

Clicks produce interaction.button_clicked with custom_id, message_id, and actor context.

On this page