# dotkit > dotkit is a zero-runtime CSS framework where every UI element is drawn as a collection of dots. > One CSS file is the single source of truth; `dotkit/react` is a thin, stateless React binding (Server Component safe). > Distributed via GitHub only (not on npm). Docs: https://daisuke-awaji.github.io/dotkit/ ## Install - Tarball: `npm i https://github.com/daisuke-awaji/dotkit/releases/download/v0.4.0/dotkit-0.4.0.tgz` - Git semver: `npm i "github:daisuke-awaji/dotkit#semver:^0.4"` - CDN: `https://cdn.jsdelivr.net/gh/daisuke-awaji/dotkit@v0.4.0/dist/dotkit.css` or `https://daisuke-awaji.github.io/dotkit/dotkit.css` - Imports: `import "dotkit/css"` once; components from `dotkit/react`. ## Core variables - `--dk-size` dot diameter (default 2px, transitionable), `--dk-gap` center distance (default 6px, transitionable), `--dk-color` dot color (currentColor) - `--dk-value` 0..1 for meter/bar, `--dk-icon-step` icon dot step (icon size = step*7), `--dk-tone` halftone gradient (black = biggest dot) - Theme tokens: `--dk-ink`, `--dk-paper`, `--dk-mute`, `--dk-subtle`, `--dk-radius`, `--dk-font-mono`; status colors `--dk-ok`, `--dk-warn`, `--dk-danger`, `--dk-info`. Dark theme: add `.dk-theme-dark` to any ancestor (a theme class also paints its own color/background, so it can be scoped). - Component knobs: `--dk-control` (checkbox/radio/switch height, 18px), `--dk-cell` / `--dk-rows` (heatmap cell pitch 12px / cells per column 7; uptime height in dots 5), `--dk-tone-filter` (image halftone pre-filter). - Value convention: continuous values -> `style="--dk-value: 0..1"`; discrete states -> `data-state="ok|warn|down|none"`. - All rules live in `@layer dotkit.base, dotkit.components, dotkit.utilities`; unlayered user CSS always wins (no !important needed). ## Classes - Primitives: `.dk-dots` (dot fill), density `.dk-sparse|.dk-normal|.dk-dense`, shape `.dk-square|.dk-ring`, fade `.dk-fade-r|-l|-t|-b|-radial` - `.dk-border` dotted outline (inherits border-radius) - `.dk-halftone` (+ `--to-bottom|--to-left|--radial|--invert`) decorative; never put content inside - `.dk-text` fills glyphs with dots (large text only) - `.dk-icon .dk-icon--{name}` 7x7 icons (+ `.dk-icon--square`); color = currentColor - `.dk-loader` with `` children (max 8) - `.dk-btn` + `.dk-btn--solid|--outline|--ghost` + `.dk-btn--sm|--lg` - `.dk-badge` (+ `--solid`), `.dk-divider` (on
), `.dk-field` wrapper + `.dk-input` - `.dk-meter` (style `--dk-value`), `.dk-chart` > `.dk-bar` (style `--dk-value`), `.dk-card` - Forms (v0.2): native inputs with `.dk-check` (checkbox, supports :indeterminate), `.dk-radio`, `.dk-switch` (checkbox + role="switch"); wrap with `