Action Component Blocks

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.

AttributeTypeDescription
textstringRequired. The label displayed on the button. The default value is Button.
widthobjectControls how wide the button is within its container.
lightning:horizontalAlignmentstringSpecifies 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.

Example
1{
2  "type": "block",
3  "definition": "lightning/actionButton",
4  "attributes": {
5    "text": "Submit",
6    "lightning:horizontalAlignment": "center"
7  }
8}

Related Items