Buttons
Last updated
Last updated
Buttons are the Symphony elements responsible for submitting a form to the bot. As a result, all Symphony form elements are required to have at least one button where `type=action
`. When an end-user clicks this button, the form and the value of each of the elements inside will be submitted to the bot via the datafeed and presented as a JSON payload.
In addition, some forms can contain reset buttons. These buttons are used to reset a form back to its original state.
Buttons support six different styles: primary
, primary-link
, secondary
, tertiary
, destructive
and destructive-link
. Each of those has different colors to suit different actions (to convey meaning). Use the class
attribute to specify the style.
Primary: use the Primary button when there is a clear primary action on a message. You can use it for the submit button, for example.
Secondary: use the Secondary button when there are multiple actions of the same importance or some actions with less importance than a single primary action.
Destructive: use the Destructive button when an action results in the removal of an item or if it can result in a potentially serious negative consequence.
Primary-link, Tertiary and Destructive-link: These styles are variations respectively of the Primary, Secondary and Destructive buttons but without borders. They are low prominence options that can be used alongside a Primary or as standalone buttons with the ability to read more information.
Attribute | Type | Required? | Description |
| String | Yes | Identifies the clicked button. |
| String | No
If | Indicates whether the button is an |
| String | No | Toggle between new palette of colors: |
| String | No |
If class
is not defined, the action button assumes the primary
class by default. Action buttons should be used for affirmation or confirmation actions.
Reset buttons have the secondary
class set by default. Reset buttons should be used when the content of the fields need to return to their original state.
The following example shows the use of the Reset and the Submit button when sending a text inserted in a Text Field.
Main features introduced | Agent needed to parse message sent by the bot | Client 2.0 release | Mobile |
---|---|---|---|
Initial release | 2.55.9 | Since first version | Since first version |
Reset features behaviour is to show back the initial value of the form | 2.55.9 | Since first version | Since first version |
New styles:
• New designs for the buttons
• Styles | 20.6 | Since first version | Since first version |
New styles: | 23.11 | 23.12 | Supported |
Adds an icon before the button name. Only icons from our are supported. Each icon is identified by its name.