# Design language (on-site frontends) > The rules every screen of the manager (and later the terminal and the waiter app) follows, so the product looks like one thing. > **Read this before writing or changing any page, dialog or component.** Change a rule here first, then in `packages/ui`, never in one page. > Started 2026-11-20 from the owner's UI review (modelled on the BellSystems control panel's `DESIGN.md`). ## 1. Principles - **Global, never local.** Anything that two pages need is a component or a token in `@xenia/ui` (`packages/ui`). If a page needs a new look, add it to `@xenia/ui` and use it from there. Never rebuild a dropdown, a tab strip or a page frame inside a page. - **Tokens only.** Colours, sizes, radii, paddings and heights come from `packages/ui/src/tokens.css` (Tailwind names from `tailwind-preset.js`). No hex or rgb values in app code (see also CS-16). - **Same height in a row.** Controls that sit side by side (a search box, dropdowns, chips, buttons) share one height: `md` (44 px, `--x-control-md`) unless the whole row is `sm`. - **Quiet secondary text.** `text-ink-2` / `text-ink-3` are muted on purpose. Don't make subtitles, hints or labels darker to make them stand out. ## 2. The page rule Every page's root is `` from `@xenia/ui`. It provides: - **its own scrolling** (the shell's `
` never scrolls), - **the width:** it fills the content area up to 2200 px (`--x-page-max`). On a 1080p monitor the page fills the screen; on an ultrawide it stays 2200 px wide and is **centred**. The width never depends on the window's height (owner 2026-11-21: a short window used to narrow the page), - **the padding and gaps** (`--x-page-pad`, `--x-page-gap`), the same on every page. ```jsx New} /> ``` - `top={}` keeps a tab strip above the scrolling part (Online orders, Settings). The tab is kept in the address (`?tab=`). - `header={}` with `top`: the page's title and description come **first**, then the tabs (Offers & pricing). Each tab then starts with its own head: title, description, its "New" button at the top right. - `fit`: the page is exactly the screen's height and doesn't scroll; its `Pane`s do, each on its own (Products). Put them in an element with `x-page__fill`. Phones scroll as usual. - The scrollbar's room is always kept (`scrollbar-gutter: stable`), so a short tab is exactly as wide as a long one. - `width="form"` for settings and forms (centred at `--x-page-form-max`, 880 px). Lists, tables and dashboards use the default (full). - **Never** put `p-*`, `max-w-*`, `mx-auto`, `h-full` or `overflow-*` on a page's root, and never nest a second width limit inside it. - Checked by `tests/e2e/manager_layout.mjs` (1920×1080 and 3440×1440: every page fills / is centred, and scrolls). Add a new page to its `PAGES` list. Every page is on `` except Inventory → Stock (a placeholder). Two-column pages put each side in its own container. Products is a `Page fit` with two `Pane`s (header and footer stay, only the list scrolls; the list's body `sunken`, a shade darker, so the white product rows stand out). The floor editor: the map and its panels, the narrow side `sticky`. ## 3. Components (`@xenia/ui`) | Need | Use | Notes | |---|---|---| | A page | `Page`, `PageHeader` | §2 | | Filters / actions over a list | `Toolbar`, `ToolbarSpacer` | every control in it the same height; the search box grows | | Search | `SearchInput` | icon, clear button; `onChange(text)` | | Choose one / several | `Dropdown` (`multiple`) | **never a native `