# Grid

## Basic

#### The JSON Data Used in the Current List

Provide the JSON content to generate the grid dynamically. The fields in the JSON array include-

| Property | Description                                                                                                                                                                                                                                                                                                                 |
| -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| rate     | <p>Expects a number value to fill the rating stars<br><br><img src="https://125370873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzdpN2Lz0hzXpnNScDzVt%2Fuploads%2Fgit-blob-c9aaed761e59a5e6e5225c70d8aaa2ac05abc76f%2Fimage%20(265).png?alt=media" alt=""></p>                                     |
| title    | <p>The title text for the grid element<br><br><img src="https://125370873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzdpN2Lz0hzXpnNScDzVt%2Fuploads%2Fgit-blob-32a8736a5a653ed9c82f1c36b203d90529bab408%2Fimage%20(266).png?alt=media" alt=""></p>                                                 |
| url      | The URL link to redirect when the user clicks on the grid element                                                                                                                                                                                                                                                           |
| cover    | <p>A valid URL reference to the image to be shown as the media content for the element<br><br><img src="https://125370873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzdpN2Lz0hzXpnNScDzVt%2Fuploads%2Fgit-blob-008c5263ca74206cd73794e269fa9c9b8c7ce0cf%2Fimage%20(267).png?alt=media" alt=""></p> |

#### Mode

|      |                                                                                                                                                                                                                                                                                                  |
| ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Grid | <p>Displays the elements as a tabular grid<br><img src="https://125370873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzdpN2Lz0hzXpnNScDzVt%2Fuploads%2Fgit-blob-6e718b0341fd8d06a21d373aef26af04a5e186ca%2Fimage%20(120).png?alt=media" alt="" data-size="original"></p> |
| List | <p>Displays the content as a list view<br><img src="https://125370873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzdpN2Lz0hzXpnNScDzVt%2Fuploads%2Fgit-blob-4c02df3f0f63226a8290a9b41d6eb42da67cefaf%2Fimage%20(121).png?alt=media" alt=""></p>                          |

#### Colum Count

The value that sets the number of elements to be displayed as columns in the grid or list. This is applicable when the widget is in '*Grid mode*'.

#### Data Item Index Name

This refers to the variable name of the index of the grid items, which usually defaults to *`i.`*

{% hint style="info" %}
Only for development purposes
{% endhint %}

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

#### Data Item Object Name

{% hint style="info" %}
Only for development purposes
{% endhint %}

Refers to the variable name for the object, points to the grid items, consisting of the image cover URL, title, and rating. This is usually named as *`currentItem`*.

## Pagination

#### Show Quick Jumper

The number field enables the user to input the page number to jump to the desired page directly.

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

#### Hide on Single Page

Allows users to hide the pagination section if the grid contains only a single page.

#### Show Size Changer Button

| Property    | Description                                                                                                                                                                                                                                                                                                                                 |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Togged ON   | <p><img src="https://125370873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzdpN2Lz0hzXpnNScDzVt%2Fuploads%2Fgit-blob-b3dc4dab659937e4fc305716e1d1a5cd1f4fd49b%2Fimage%20(125).png?alt=media" alt="" data-size="original"><br>Specify the options to dissect the page size dynamically</p>                           |
| Toggled OFF | <p><img src="https://125370873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzdpN2Lz0hzXpnNScDzVt%2Fuploads%2Fgit-blob-76c5ca224639971748ae82d02f5a66340ff49906%2Fimage%20(126).png?alt=media" alt="" data-size="original"><br>Specify the page size that will fix the count of elements to be shown on each page</p> |

#### Page Size

Set the numerical value to decide number of items to be shown per page on the widget.

#### Total Row Count

The value that decides the number of items to be displayed on the widget in total. It is set to the total count of the items in the array when it is dynamic.

#### Hide Pagination

Choose whether to show or hide the pagination section by toggling the ON or OFF switch. This control allows you to determine whether the pagination section will be visible on the screen or not.

## Interaction

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

#### 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-2de2fb6cc1798894df304b8c6f5003d144c9397e%2Fimage%20(127).png?alt=media" alt=""><figcaption></figcaption></figure>

## Layout

#### Height

|       |                                                                      |
| ----- | -------------------------------------------------------------------- |
| Auto  | The height is auto-adjusted for the content                          |
| Fixed | The height of the widget is fixed and will not adjust to the content |

#### Row Height

The number value sets the padding space between the rows. The default row height is 100, and it can be increased to add more space between the rows.

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

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

#### Tooltip

Tooltips display additional information upon mouse hover. This information will be contextual, useful, and informative. The tooltip will be immediately shown when the user's mouse hovers over the widget, and immediately hides when the user's mouse leaves.

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

#### Show Border Bottom

Displays a borderline at the bottom of each grid item, visually separating the items.

<figure><img src="https://125370873-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FzdpN2Lz0hzXpnNScDzVt%2Fuploads%2Fgit-blob-0e33ecb36e45018b0cda357cf9b323ae01561878%2Fimage%20(145).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">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">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 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>
