# Button

## **Look\&Feel Settings:**

**Label** (not mantory) to be used to show the component's label.\
\
**Icon** (not mantory) - button icon.\
\
**Size** (mantory) - standard button sizes.\
\
**Type** (mantory) - standard button layouts.\
\
**Name** (mantory) - this name will help you find this component in BP.\
\
**Enabled** (mantory) - availability of the button in the application. Is turned on by default.\
\
**Visible** (mandatory) - makes the component visible if turned on. Enabled by default.<br>

![](https://3563768697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MapxHzVskQ_27pNUTT4-1972196547%2Fuploads%2FgjLidzN3aMrh3fQESHAw%2Fimage.png?alt=media\&token=bc4b6fb6-4d9d-4bfd-a7c6-1f9cfad44f6e)

## **Workflow triggers:**

* **onCreate** – fires when the element is created on the page;&#x20;
* **onShow** – fires when the component changes its state to visible (displayed on the page);&#x20;
* **onHide** – fires when the component changes its state to hidden (stops being displayed);&#x20;
* **onDestroy** – fires when the component is destroyed;
* **onClick** - fires when the component is clicked.\ <br>

## **Component Actions:**

### Button Get Properties:

Gets the button's properties<br>

**Input** parameters:

* **Component Id** \[*string*] *-* button component's identifier.

**Output** parameters:

* **Label** \[*string*] - button's label;
* **Type** \[*enum*] - button's type;
* **Size** \[*enum*] - button's type;
* **Icon** \[*enum*] - button's icon;
* **Color** \[*string*] - button's color;
* **Visible** \[*boolean*] - button's visibility state;
* **Enabled** \[*boolean*] -  button's enabled/disabled state;
* **Loading** \[*boolean*] - button's loading state.<br>

![](https://3563768697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MapxHzVskQ_27pNUTT4-1972196547%2Fuploads%2FxKQIuY71MCYobUpayGTu%2Fimage.png?alt=media\&token=f5de81f2-fd0e-415e-a22a-59d9ee92bb11)

### Button Set Properties

Sets all button's properties\
\
**Input** parameters:

* **Component Id** \[*string*] *-* button component's identifier.
* **Label** \[*string*] - button's label;
* **Type** \[*enum*] - button's type;
* **Size** \[*enum*] - button's type;
* **Icon** \[*enum*] - button's icon;
* **Color** \[*string*] - button's color;
* **Visible** \[*boolean*] - button's visibility state;
* **Enabled** \[*boolean*] -  button's enabled/disabled state;
* **Loading** \[*boolean*] - button's loading state.<br>

![](https://3563768697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MapxHzVskQ_27pNUTT4-1972196547%2Fuploads%2FkNvWZTWMgStgtymrMiYp%2Fimage.png?alt=media\&token=e2c78a9d-5680-4fd3-a361-e04edbc9b2a7)

### Button Update Properties

Update the button's properties

**Input** parameters:

* **Component Id** \[*string*] *-* button component's identifier;
* **Label** \[*string*] - button's label;
* **Type** \[*enum*] - button's type;
* **Size** \[*enum*] - button's type;
* **Icon** \[*enum*] - button's icon;
* **Color** \[*string*] - button's color;
* **Visible** \[*boolean*] - button's visibility state;
* **Enabled** \[*boolean*] -  button's enabled/disabled state;
* **Loading** \[*boolean*] - button's loading state.

![](https://3563768697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MapxHzVskQ_27pNUTT4-1972196547%2Fuploads%2FxRimKTmDhGrnJdZnxSbh%2Fimage.png?alt=media\&token=93e15bdc-aa68-4035-84c4-2f1c4c57301c)

### Button Click

Performs a button click

**Input** parameters:

* **Component Id** \[*string*] *-* button component's identifier.

![](https://3563768697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MapxHzVskQ_27pNUTT4-1972196547%2Fuploads%2FnLig4j0Et8FWYsniIumb%2Fimage.png?alt=media\&token=7075beab-087b-43de-98a8-484d5115ee27)

### Button Reset State

Resets all button states to default

**Input** parameters:

* **Component Id** \[*string*] *-* button component's identifier.

![](https://3563768697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MapxHzVskQ_27pNUTT4-1972196547%2Fuploads%2FovP8w4E0BF1e8geAmhsJ%2Fimage.png?alt=media\&token=d739451b-7b0b-4468-b62f-ff7afc78d82c)

### Button Set Loading

Sets the loading state to true

**Input** parameters:

* **Component Id** \[*string*] *-* button component's identifier.

<br>

![](https://3563768697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MapxHzVskQ_27pNUTT4-1972196547%2Fuploads%2FQln86lT1EPldoQ1hL3NQ%2Fimage.png?alt=media\&token=bad12af6-2d37-4ac5-9d77-bbcbd99d9f5e)

### Button Remove Loading

Sets the loading state to false\
\
**Input** parameters:

* **Component Id** \[*string*] *-* button component's identifier.

![](https://3563768697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MapxHzVskQ_27pNUTT4-1972196547%2Fuploads%2FVqurCZlwz1CJe9ABPLTX%2Fimage.png?alt=media\&token=1229c1d1-7a11-452e-ae1c-7c9c6215669c)

### Button Enable

Sets the enabled state to true

**Input** parameters:

* **Component Id** \[*string*] *-* button component's identifier.

![](https://3563768697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MapxHzVskQ_27pNUTT4-1972196547%2Fuploads%2FmJThv4glGiH9TVxaHZUw%2Fimage.png?alt=media\&token=bbd66c26-c45f-436b-8130-8ee71147bee5)

### Button Disable

Sets the enabled state to false

**Input** parameters:

* **Component Id** \[*string*] *-* button component's identifier.

![](https://3563768697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MapxHzVskQ_27pNUTT4-1972196547%2Fuploads%2FqCoYr14QnmtHFzdPj7H5%2Fimage.png?alt=media\&token=adf16c5c-669f-4768-9044-d372294a4310)

### Button Show

Sets the visible state to true

**Input** parameters:

* **Component Id** \[*string*] *-* button component's identifier.

![](https://3563768697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MapxHzVskQ_27pNUTT4-1972196547%2Fuploads%2FTBimAFP7O6OkFhhUb9Hl%2Fimage.png?alt=media\&token=c2e624cd-02b8-4643-9038-c2021fc31194)

### Button Hide

Sets the visible state to false

**Input** parameters:

* **Component Id** \[*string*] *-* button component's identifier.

![](https://3563768697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MapxHzVskQ_27pNUTT4-1972196547%2Fuploads%2FQ7fES4TDolx6GSOeeBYj%2Fimage.png?alt=media\&token=ebf63cf6-288b-47fc-93e6-7c9f3879f2dc)

## **Usage example:**

For example, using a button to open a modal window

![](https://3563768697-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MapxHzVskQ_27pNUTT4-1972196547%2Fuploads%2FboJ6WRpC88ScHURUfu3Q%2Fimage.png?alt=media\&token=b5ce08de-44a6-401f-81bb-59b60f007929)
