Skip to content
VinUITheming

Theming

A theme is a style, an accent colour and a few options, set on one element. Every component reads the same tokens, so they all follow.

The theme root

Put the settings on <html> (or any element, to theme just that part of the page).

HTML
<html data-vin-style="tactile" data-vin-mode="dark" data-vin-radius="lg" style="--vin-accent: #0d9488">

Without data-vin-mode, light or dark follows the visitor's system setting.

Accent colour

Any colour works. VinUI works out readable text on top of it, and a darker or lighter shade where the accent is used as text, so contrast stays at WCAG AA. The CLI writes these into vin.css; in plain HTML, setting --vin-accent is enough.

Options

AttributeValues
data-vin-styleprecision, tactile, clay, tonal, editorial, terminal, paper, bento
data-vin-modelight, dark (leave off for system)
data-vin-radiusnone, sm, md, lg, full
data-vin-grayslate, stone
data-vin-fontinter, geist, system, mono, custom (with --vin-font)
data-vin-densitycompact, comfortable
data-vin-motionreduced, off

Theme files

The Customize panel in the header exports your theme as vin-theme.json and saves named themes in your browser. Start a project from one:

Terminal
npx @vinish/ui init --theme ./vin-theme.json

Switch styles later without touching your components; only vin.css changes.

Terminal
npx @vinish/ui style editorial