v1.3.0 28

Installation

Five ways to add Veritheme, then your own theme and dark mode. The MCP server for AI tools has its own page.

CDN

No build step. The script wires every interactive component on its own.

jsDelivr
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/veritheme/veritheme-base.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/veritheme/veritheme.min.css">
<script src="https://cdn.jsdelivr.net/npm/veritheme/veritheme.min.js"></script>

The first file is the page reset: it removes the browser's margin around the page and sets your typeface on the body. Leave it out only when Veritheme joins a page that has its own. The same files are on unpkg: unpkg.com/veritheme/…

npm

Install the package, then import the CSS — and the JS if you use interactive components.

Terminal
npm install veritheme
Entry file
import 'veritheme/veritheme-base.min.css'; // the page reset
import 'veritheme/veritheme.min.css';
import 'veritheme'; // interactive components
View on npm

shadcn CLI

Copy single components into your project; the CLI pulls in what they depend on.

Terminal
npx shadcn@latest add https://veritheme.com/r/button.json

Or register the @veritheme namespace in components.json and run npx shadcn@latest add @veritheme/button:

components.json
{
  "registries": {
    "@veritheme": "https://veritheme.com/r/{name}.json"
  }
}

Every item: /r/registry.json. Import styles/veritheme/base.css once, before the components.

Download ZIP

The compiled files of veritheme@1.3.0, the same as on npm.

veritheme
themes
default.json6 KB
package.json2 KB
veritheme.css330 KB
veritheme.min.css268 KB
veritheme-base.css3 KB
veritheme-base.min.css3 KB
veritheme.js131 KB
veritheme.min.js64 KB
theme-manifest.json129 B
README.md8 KB
LICENSE1 KB
Download ZIP

Source Files

The repository: source, Sass and build scripts. Needs Node.js.

Terminal
git clone https://github.com/tarasenko-by/veritheme.git
View on GitHub

Your own theme

The library ships the Default theme. Your system from Studio replaces its tokens with one stylesheet.

Create your design system in Studio and download its package. Unzip it into your project root and load its theme.css right after the library. It sets the tokens on :root, so no attribute is needed, and its dark block follows the same .dark class.

index.html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/veritheme/veritheme-base.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/veritheme/veritheme.min.css">
<link rel="stylesheet" href="theme.css">
<script src="https://cdn.jsdelivr.net/npm/veritheme/veritheme.min.js" defer></script>

The package also holds the library files it was built on, so it works without a CDN. Keep veritheme.system.json and tokens.json next to it: the MCP server reads your system from them.

Dark mode

One class on the root element. Every token flips; components need nothing of their own.

Add dark to <html>. To follow the visitor's choice and the system setting, apply it before the page paints:

<head>
<script>
  // In <head>, before the page paints: no flash of the light theme.
  const saved = localStorage.theme;
  const prefersDark = matchMedia('(prefers-color-scheme: dark)').matches;
  if (saved === 'dark' || (!saved && prefersDark)) {
    document.documentElement.classList.add('dark');
  }
</script>
Toggle
const dark = document.documentElement.classList.toggle('dark');
localStorage.theme = dark ? 'dark' : 'light';