If you build
Framework-free CSS and a small script with no dependencies. It works in plain HTML, in a server-rendered template and inside any framework. There is no npm package today; the files below and this repository are the distribution.
The files
Section titled “The files”| File | What it is |
|---|---|
xg-tokens.css |
218 CSS custom properties, --xg-*. All 4 themes in one file, switched by two attributes. |
xg-tokens.json |
The same tokens, resolved per theme. For charts, native apps, emails and design tools. |
xg-ui.css |
The components. Every value is a token; there is no literal color in it. |
xg-ui.js |
Opt-in behaviors: sortable and paginated tables, tabs, dialogs, menus, toasts, the date-range picker, the wizard. |
xendiz-glass-ui-kit.zip |
All four, zipped. |
The source is in this repository: tokens/ for the tokens, packages/ui/ for the kit. Copy the files into your project and pin the version you took (it is at the top of the changelog).
Install
Section titled “Install”<html lang="en" data-brand="xendiz" data-theme="light"><head> <link rel="stylesheet" href="/vendor/xg/xg-tokens.css"> <link rel="stylesheet" href="/vendor/xg/xg-ui.css"> <script src="/vendor/xg/xg-ui.js" defer></script></head><body class="xg">Two attributes pick the theme. data-brand is xendiz or waardex. data-theme is light or dark. Set both on <html>, or on any wrapper to scope a preview. Set both every time: a wrapper with only one of them inherits the other from the page and can mix themes.
Fonts are not in the CSS. Load Space Grotesk and Inter for Xendiz, Lexend Deca and Inter for WaardeX, from your own server (WOFF2 files are in the brand pack) or from Google Fonts. The token stacks name the variable fonts first and fall back to system fonts.
A first screen in four steps
Section titled “A first screen in four steps”- The shell. Copy the markup from App shell: sidebar, topbar, main.
- The page head. Title, one line of context, a date-range picker, the primary button.
- The content. A row of KPI cards, then a data table with
data-xg-table data-page-size="25". - The states. Wire loading, empty and error from States before you wire data.
The Dashboard pattern is this screen, finished. Its markup is on its page.
Behaviors
Section titled “Behaviors”Everything interactive is declared with a data attribute, and works without script where the platform allows (native <dialog>, <select>, radios, the popover attribute).
// after you insert markupXG.init(container);// a toast from codeXG.toast({ title: 'Campaign published', text: 'Live in 4 markets.', tone: 'success', action: 'View' });| Attribute | Does |
|---|---|
data-xg-table, data-page-size |
Sorting by `button[data-xg-sort=“text |
data-xg-tabs |
WAI-ARIA tabs with arrow keys, Home and End. |
data-xg-open="id" / data-xg-close |
Opens and closes a <dialog> modal or drawer; focus returns to the opener. |
data-xg-dropdown |
Menu button with arrow keys and Escape. |
data-xg-daterange |
Presets, two months, Apply and Cancel. |
data-xg-wizard |
Steps with per-step validation. |
data-xg-toast='{…}' |
A toast on click. |
img[data-xg-logo] |
Swaps the brand logo for the nearest data-brand and data-theme. |
Rules the code follows
Section titled “Rules the code follows”- Use semantic tokens only:
var(--xg-color-text-muted), nevervar(--xg-color-ink-600)and never a hex. - Add a modifier, not an override. If you need a fourth button variant, ask for it (Contributing).
- Keep the markup the component page shows: the roles and ARIA attributes are part of the contract.
- Respect
prefers-reduced-motionandprefers-reduced-transparency. The kit already does; your additions must too.
What to hand a coding agent
Section titled “What to hand a coding agent”Give it DESIGN.md from the root of this site’s repository. It is the short contract: the files, the attributes, the token names, the component list and the rules above, written for a model to follow. Add the component pages you need as links. Ask it to use only classes that appear on those pages.
First thing to do: download the kit, open README.txt, and paste the Dashboard markup into an empty page.