# Control Button

<figure><img src="https://125370873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzdpN2Lz0hzXpnNScDzVt%2Fuploads%2Fgit-blob-e2bae754fc256885468ba63674734d4f01521b04%2Fimage%20(15).png?alt=media" alt=""><figcaption></figcaption></figure>

## Basic

#### Icon

Choose one from the set of icons that will be displayed as the logo. Recommended to pick a logo that closely represents the need of the button.

<figure><img src="https://125370873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzdpN2Lz0hzXpnNScDzVt%2Fuploads%2Fgit-blob-06593ec4c946b54b8d10274c05a80ebdb0b5c462%2Fimage%20(3)%20(1)%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

## Interaction

### Default

<mark style="color:blue;">**`Click`**</mark> - This is triggered when this is used as a default button and the user clicks on it.

<figure><img src="https://125370873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzdpN2Lz0hzXpnNScDzVt%2Fuploads%2Fgit-blob-10d7e996143043db710b8170f9d28197efd79027%2Fimage%20(188).png?alt=media" alt=""><figcaption></figcaption></figure>

#### Disabled

Disables the user interaction with the element on the page. It visually indicates that the element is inactive and prevents users from interacting with it when applied.

<figure><img src="https://125370873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzdpN2Lz0hzXpnNScDzVt%2Fuploads%2Fgit-blob-695f356d5e8bc58072102f50922157508eb6122b%2Fimage%20(224).png?alt=media" alt=""><figcaption><p>Read-only</p></figcaption></figure>

#### Hide

This sets whether the widget has to be displayed on the screen when the program is loaded. This shows/hides the widget both on desktop and mobile devices.

<figure><img src="https://125370873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzdpN2Lz0hzXpnNScDzVt%2Fuploads%2Fgit-blob-4aaa812d0b623487c085a616219a4515138079fb%2Fimage%20(211).png?alt=media" alt="" width="338"><figcaption><p>Set the visibility</p></figcaption></figure>

#### Loading

It will be useful when there is a process to be carried out, like running a query to fetch data, before the widget is loaded. The `loading` boolean value can be utilized to show the spinner till the process is complete.

<figure><img src="https://125370873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzdpN2Lz0hzXpnNScDzVt%2Fuploads%2Fgit-blob-c67f2b672db6a42ef8815bae1bc6c9fb4d5bea53%2Fimage%20(223).png?alt=media" alt=""><figcaption><p>Loading state</p></figcaption></figure>

## Layout

#### Height

|       |                                             |
| ----- | ------------------------------------------- |
| Auto  | The height is auto-adjusted for the content |
| Fixed | The height of the widget is fixed           |

#### Icon Size

Enter the size of the icon in terms of 'px' measure. It is recommended to keep the number to fit the button layout.

<figure><img src="https://125370873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzdpN2Lz0hzXpnNScDzVt%2Fuploads%2Fgit-blob-39af8b1d3ea3744db126cea09837726f9fb8411d%2Fimage%20(4)%20(1)%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

## Style

<table><thead><tr><th width="218" align="center">Property</th><th>Description</th></tr></thead><tbody><tr><td align="center">Background</td><td>Users can change the colour of the text background using this property. It has all the RGB colour ranges to pick from. It is recommended to use a corresponding background colour that shows the font clearly.</td></tr><tr><td align="center">Box Shadow</td><td>The is the colour of the shadow that is generated behind the widget box. The X and Y axis values can be altered such that the shadow can be set to fall anywhere behind the widget area.<br>"x-offset" - a positive number specifies the shadow will be on the right of the box, and a negative number will put the shadow on the left of the box.<br>"y-offset" - a negative one means the shadow will be above the box, and a positive number means the shadow will be below the box.<br>"Blur" - if the number is set to 0 then the shadow will be sharp. It will more blurred as the number goes higher, and the shadow will extend further away.<br>"Color" - sets the colour of the shadow. If the colour is not set, the box shadows are drawn in the foreground colour.</td></tr><tr><td align="center">Icon Color</td><td>Set the color to the icon that is picked using the 'Icon' field</td></tr><tr><td align="center">Loader Color</td><td>Pick the colour to the loading spinner when the component shows the loader before getting displayed.</td></tr><tr><td align="center">Border Color</td><td>Set the colour to the border lines. The border lines will be shown only if that is enabled.</td></tr><tr><td align="center">Margin</td><td>This value is set in terms of "px" number which creates the space between the border and the content of the widget.</td></tr><tr><td align="center">Padding</td><td>This value is set in terms of "px" number which creates the space between the border and outer elements.</td></tr><tr><td align="center">Border Radius</td><td>This sets the radius of the widget's corners, enabling rounded corners on the widget. This value is defined in "px" terms.</td></tr><tr><td align="center">Border Width</td><td>Set the thickness of the border of the widget using this value. It is defined using "px" terms.</td></tr></tbody></table>

#### Aspect Ratio

Allows the user to set width-to-height ratio. Specifies that if the parent container or viewport size changes, the browser will adjust the widget's dimensions to maintain the specified width-to-height ratio. [MSDN web docs](https://developer.mozilla.org/en-US/docs/Web/CSS/aspect-ratio)
