Primitives

ARK's design tokens for colour, size, typography, radius and elevation.

Installation

The tokens ship in @kela-systems/tokens. An app that installs the components already has them:

pnpm add @kela-systems/ui-components

Usage

One import, after Tailwind, brings the tokens, the utilities built on them and the fonts:

@import "tailwindcss";
@import "@kela-systems/ui-components/styles.css";

Style your own elements with the semantic utilities, such as surface-raised, text-neutral-secondary and border-neutral-primary. Each one reads a CSS variable, so it follows the theme. Never write a raw colour.

Theming

ARK has three themes. The theme is a class on <html>: none for light, dark for dark, and dark dark-contrast for dark contrast. The button at the top of this site switches between them, and every sample on these pages follows it.

CSS variables

Every token is a CSS variable. Primitives are fixed values, such as --dimension-4 and --rounded-md. Semantic tokens, such as --fg-neutral-primary, point at a different palette step in each theme. For code that can't read CSS variables, @kela-systems/tokens/values.json has every semantic token's resolved value per theme.

The primitives

Color

Palettes and the semantic tokens built on them, in every theme.

Size

The dimension scale behind every gap, padding, width and height.

Typography

Text styles, and the size, weight and spacing scales behind them.

Radius

Corner radii, from a checkbox to a full pill.

Elevation

Shadows that lift a surface above the page, and the focus rings.

Read this page as Markdown

Search ARK

Find a page, a primitive or a component.