# Modal

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

## Basic

|        Property        | Description                                                                                                                                                                                                               |
| :--------------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|         Height         | <p><code>Auto</code> - the height of the widget is auto-adjusted with the screen size and display.<br><code>Fixed</code> - the heigh of the widget is fixed in terms of 'px' value.</p>                                   |
|       Modal Width      | Specify the width number of the modal, either in terms of '%' (of the screen) or in terms of 'px'.                                                                                                                        |
|          Title         | The header text for the modal                                                                                                                                                                                             |
|     Title Alignment    | <p><code>Left</code> - aligns the title to the left of the section.<br><code>Center</code> - aligns the title at the middle of the section.<br><code>Right</code> - aligns the title to the right end of the section.</p> |
|     Hide Title Bar     | Toggle this on to hide the header title from display                                                                                                                                                                      |
|    Hide Close Button   | Toggle this on to hide the 'X' button that closes the modal upon click                                                                                                                                                    |
|   Close on escape key  | Pressing the ESC key on the keyboard closes the modal when the widget is active                                                                                                                                           |
| Click Outside to Close | Gives users the option to click outside the area to close the modal                                                                                                                                                       |
|        Show Mask       | Toggle this on to show a grey-blurred mask on the screen, surrounding the widget                                                                                                                                          |

## Interaction

#### Event Handlers

| Event                                        | Description                                                                                                                                                                                                                                                                                                                                                      |
| -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <mark style="color:blue;">**`Close`**</mark> | <p>The "Close" event is activated when the widget is closed. When this event triggers, the associated action gets executed.<br><br><img src="https://125370873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzdpN2Lz0hzXpnNScDzVt%2Fuploads%2Fgit-blob-35cafabdfdfeed336106760638d8163fd9dd77a5%2Fimage%20(345).png?alt=media" alt=""></p> |

#### 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>

## 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">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">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">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">Title Background</td><td>Set the background colour for the header text area.</td></tr><tr><td align="center">Title Color</td><td>Set the colour for the title text. Recommended to pick this colour in contrast with the Title Background to show the text clearly.</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><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">BG Image</td><td>Provide the URL for the image serves as the background image to the widget</td></tr><tr><td align="center">BG Repeat</td><td>Controls the repetition of the widget's background image.<br><code>repeat</code> - The background image is repeated both vertically and horizontally.<br><code>no-repeat</code> - The background-image is not repeated. The image will only be shown once.<br>The reference to the list of options can be found here: <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/background-repeat">MDN web docs</a></td></tr><tr><td align="center">BG Size</td><td><p>Specifies the size of the background image.<br><code>auto</code>- Default value. The background image is displayed in its original size<br>cover - Resize the background image to cover the entire container, even if it has to stretch the image or cut a little bit off one of the edges</p><p>The reference to the list of options can be found here: <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/background-size">MDN web docs</a></p></td></tr><tr><td align="center">BG Position</td><td>Sets the starting position of a background image.<br>center - keeps the image at the center position.<br>The reference to the list of options can be found here: <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/background-position">MDN web docs</a></td></tr><tr><td align="center">BG Origin</td><td>Specifies the origin position (the background positioning area) of the background image. The reference to the list of options can be found here: <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/background-origin">MDN web docs</a></td></tr></tbody></table>
