Action component blocks are interactive buttons for form submissions and custom actions.
lightning/actionButton
Interactive button for form submissions and custom actions. Unlike lightning/button, which requires a destination URI for navigation, lightning/actionButton defaults to form submission behavior and supports custom click handlers.
| Attribute | Type | Description |
|---|---|---|
text |
string | Required. The label displayed on the button. The default value is Button. |
width |
object | Controls how wide the button is within its container. |
lightning:horizontalAlignment |
string | Specifies the horizontal position of the button within its column. Possible values are left, center, or right. |
This example shows how to create a centered submit button.
{
"type": "block",
"definition": "lightning/actionButton",
"attributes": {
"text": "Submit",
"lightning:horizontalAlignment": "center"
}
}