|
| 1 | +import { Meta } from '@storybook/addon-docs/blocks' |
| 2 | + |
| 3 | +<Meta title="Guidelines" tags={['hide-toolbar']} /> |
| 4 | + |
| 5 | +# Guidelines |
| 6 | + |
| 7 | +## Containers |
| 8 | + |
| 9 | +We use three container types depending on content density. |
| 10 | + |
| 11 | +**Main Container** is the default layout container. It should be used for pages with minimal or non-text content (e.g. graphs, dashboards). |
| 12 | + |
| 13 | +**Content Container** is used for text-heavy layouts. All long-form content must be placed inside this container. The maximum readable width is **768px**. |
| 14 | + |
| 15 | +**Extra Container** is used for dense layouts (e.g. code, detailed views) where additional horizontal space is required. |
| 16 | + |
| 17 | +A right sidebar (304px) may be used for secondary content when needed. |
| 18 | + |
| 19 | +Text and input fields should not exceed **768px** in width |
| 20 | + |
| 21 | +## Element Sizes |
| 22 | + |
| 23 | +Interactive element sizes: |
| 24 | + |
| 25 | +- 24 — 2xs (rare) |
| 26 | +- 28 — xs (compact) |
| 27 | +- 32 — sm (minimum recommended) |
| 28 | +- 36 — md (default) |
| 29 | +- 42 — lg |
| 30 | +- 48 — xl |
| 31 | +- 56 — 2xl |
| 32 | +- 64 — 3xl |
| 33 | + |
| 34 | +## Typography |
| 35 | + |
| 36 | +- Base font size: **16px** |
| 37 | +- Minimum font size: **14px** (use sparingly) |
| 38 | + |
| 39 | +Text casing: |
| 40 | + |
| 41 | +- **Uppercase** — for headings |
| 42 | +- **Lowercase** — for UI elements |
| 43 | +- **Normal** - for body content |
| 44 | + |
| 45 | +[See Typography](https://storybook.npmx.dev/?path=/docs/tokens-typography--docs) |
| 46 | + |
| 47 | +## Surfaces & Sections |
| 48 | + |
| 49 | +To visually separate content blocks (grouped content, cards, settings sections), use subtle background variations: |
| 50 | + |
| 51 | +- `bg-muted` |
| 52 | +- `bg-subtle` |
| 53 | + |
| 54 | +## Borders & Radius |
| 55 | + |
| 56 | +- subtle border |
| 57 | +- light border radius |
| 58 | +- soft "glass-like" appearance |
| 59 | + |
| 60 | +Only avatars should have fully circular shapes. |
| 61 | + |
| 62 | +## Colors |
| 63 | + |
| 64 | +- Primary surfaces: **white** (`fg`) |
| 65 | +- Secondary or less important content: use softer, muted tones |
| 66 | + |
| 67 | +[See Colors](https://storybook.npmx.dev/?path=/docs/tokens-colors--docs) |
| 68 | + |
| 69 | +## Layout Stability |
| 70 | + |
| 71 | +Interfaces must remain visually stable across screens and pages. Avoid layout shifts. If shifts are unavoidable, place elements where movement is not critical to user interaction. |
| 72 | + |
| 73 | +## Responsiveness specifics |
| 74 | + |
| 75 | +On smaller screens: |
| 76 | + |
| 77 | +- Button text may be hidden (icons only) |
| 78 | +- Keyboard shortcuts may be hidden |
| 79 | + |
| 80 | +## General Principles |
| 81 | + |
| 82 | +- Preserve the meaning of elements (avoid links like button, etc) |
| 83 | +- Maintain sufficient spacing |
| 84 | +- Keep interfaces accessible |
| 85 | +- Prefer simple, predictable layouts |
| 86 | +- Design components to be easy to implement and scale |
0 commit comments