The Button component allows user to perform a list of predefined actions by clicking on the corresponding button. Its default display mode is the HTML <button>
element, which be configured to display a link.
Configuration options
Option |
Description |
Type |
Default |
component |
The path to the component’s JS constructor in terms of RequireJS. |
String |
Magento_Ui/js/form/components/button |
additionalClasses |
Sets custom classes to the component's DOM block. |
Object |
{} |
disabled |
Initial component's state. When set to true , users can't take action on the element. |
Boolean |
false |
displayArea |
Renders the component in the location that was declared in the layout. |
String |
outsideGroup |
displayAsLink |
Show the button as a link. |
Boolean |
false |
elementTmpl |
The path to the child component’s .html template. |
String |
'' |
template |
Path to the general .html template for a button. |
String |
'' |
title |
Button title. |
String |
'' |
visible |
Initial component's visibility. When set to false , the "display: none CSS style is added to the component's DOM block. |
Boolean |
true |
actions |
A list of actions that are performed when user clicks on the element. |
ButtonAction[] |
- |
Option |
Description |
Type |
Required |
targetName |
Reference to component. |
String |
Required |
actionName |
Name of the component's method to be invoked. |
String |
Required |
params |
A list of arguments that will be passed to the method. |
Array |
Optional |