> For the complete documentation index, see [llms.txt](https://uia-design-system.gitbook.io/project/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://uia-design-system.gitbook.io/project/foundations/rules.md).

# Rules

## Making changes to UI patterns

UI patterns can and should be modified for a number of reasons: feature additions, bug fixes, subtle or major visual design tweaks, performance improvements, accessibility enhancements, code refactoring, UX best practice updates, and so on.

The design system maintainers need to understand why and when to tweak patterns, how to go about making those changes, and how to roll out those improvements into individual applications.

Keeping patterns fresh is essential for the long-term health of the design system.

<div align="left"><img src="https://1910782684-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LazByYq1uHla9pNgMWy%2F-Lb3p14afO-m9KAgZsTC%2F-Lb3p9pcflw4i-R5qSX4%2FMask%20Group.png?alt=media&amp;token=36145225-0e02-411a-a421-c8257daa582a" alt=""></div>

## Grid

We uses the grid system to achieve the order of the visual system. For all elements we are using `4px` grid unit. This size goes through all compositions, components and elements. Grid system thinking can help designers quickly achieve design decisions in the layout space while simplifying communication between designers developers.

![](https://1910782684-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LazByYq1uHla9pNgMWy%2F-LbSTj8HJoFIAFcTQ71d%2F-LbSTl0ALFhi0rFUKWVc%2Fgrid.png?alt=media\&token=0d1b0a99-9298-412b-96e0-f982af340a00)

## Localization

| Amount of symbols in English text | Approximate length growth in different languages |
| --------------------------------- | ------------------------------------------------ |
| <10                               | 200-300%                                         |
| 11-20                             | 180-200%                                         |
| 21-30                             | 160-180%                                         |
| 31-50                             | 140-160%                                         |
| 51-70                             | 130-140%                                         |
| >70                               | 150%                                             |

## Animation

Hover animation styles

```css
transition: 0.2s ease-in-out
```

For indeterminate states we show spinner

<div align="left"><img src="https://1910782684-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LazByYq1uHla9pNgMWy%2F-Lb3qek6txu0N2ebg2jA%2F-Lb3r6rZhkjQz0nNtJvR%2Fspinner.png?alt=media&amp;token=7904fcc2-cf3c-451f-99b2-6d0e8117cdf8" alt=""></div>

Also we could show spinner in button

<div align="left"><img src="https://1910782684-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LazByYq1uHla9pNgMWy%2F-Lb3qek6txu0N2ebg2jA%2F-Lb3rLZDlIQGkiYXOiVM%2Floading.png?alt=media&amp;token=991bc7a3-6566-4f6a-b409-a79a3dae9fb3" alt=""></div>

<div align="left"><img src="https://1910782684-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LazByYq1uHla9pNgMWy%2F-Lb3rcx1YGmCv29iAOxv%2F-Lb3rfRu5m483kAjbmpy%2Fmobile.png?alt=media&amp;token=ab936970-3ac2-4608-9fcc-759485f72919" alt="Preview on mobile app"></div>

## Border radius

{% tabs %}
{% tab title="Web" %}
We used flat corners with `0px` border radius.

![](https://1910782684-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LazByYq1uHla9pNgMWy%2F-LbSS_DDhWpsxftsXgrC%2F-LbSSbeV2I0IMRZ6L2QH%2Finput.png?alt=media\&token=0dc1efaf-b48c-4e23-ac9e-db21b1303075)
{% endtab %}

{% tab title="iOS/Android" %}
Use `4px` border radius for buttons, cards and inputs

![](https://1910782684-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LazByYq1uHla9pNgMWy%2F-LbTGHsHtAh72HyH8G3u%2F-LbTH2bQq4Za3VGQeTNp%2FBorder%20raduis.png?alt=media\&token=f98e81ba-76b6-48ee-b550-a809f8226427)
{% endtab %}
{% endtabs %}

## Shadow

Shadow size reflects elevation. Surfaces at higher elevations have larger shadows, while those at lower elevations have smaller shadows.

![](https://1910782684-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LazByYq1uHla9pNgMWy%2F-LbSS13MYLd11GH78xCr%2F-LbSS3hxqps0BYCjKM3L%2FShadow.png?alt=media\&token=cb5f4c76-de86-4ac5-8954-d277cccfb408)

{% tabs %}
{% tab title="Web" %}

```css
z1 {
box-shadow: 0px 1px 4px rgba(0, 0, 0, 0.15);
}
z2 {
box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.15);
}
z3 {
box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.15);
}
```

{% endtab %}

{% tab title="iOS" %}

```
```

{% endtab %}

{% tab title="Android" %}

```
```

{% endtab %}
{% endtabs %}
