# Install the CSS framework in minutes

> Install iVOLT from npm, or drop two prebuilt files next to your page. No build step, no configuration file and no runtime dependencies. Start in minutes.

Source: https://ivolt.intervolutions.com/getting-started · iVOLT 1.1.2 · English

iVOLT ships as prebuilt CSS and JavaScript. Two files are enough: a stylesheet and a script. No build step, no configuration file, no runtime dependency — and the same two files work in plain HTML, WordPress, Astro or any bundler.

**Version:** `1.1.2`. **Licence:** MIT. **Engines tested:** Chromium, Firefox, WebKit.

Couldn't load the demo. [Open alone](https://ivolt.intervolutions.com/stage/button/variants.html?id=fx-button-variants)

```html
<div class="iv-cluster">
  <button class="iv-button iv-button--primary" type="button">Primary</button>
  <button class="iv-button iv-button--secondary" type="button">Secondary</button>
  <button class="iv-button iv-button--ghost" type="button">Ghost</button>
  <button class="iv-button iv-button--danger" type="button">Danger</button>
  <button class="iv-button" type="button">Neutral</button>
  <a class="iv-button iv-button--secondary" href="#docs">Link as button</a>
</div>
```

## From a CDN

Two lines in your page, nothing to install. This is the fastest way to try it.

```src
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@intervolutions/ivolt@1/dist/css/ivolt.min.css">
<script type="module" src="https://cdn.jsdelivr.net/npm/@intervolutions/ivolt@1/dist/js/auto.min.js"></script>
```

Put both in `<head>` and add `class="iv-root"` to `<html>`. `auto.min.js` starts every component on the page by itself; leave it out and everything still renders, as plain HTML. `@1` follows the latest 1.x; pin an exact version (`@1.1.2`) in production.

Rather start from a whole page? [Download the plain HTML starter](https://ivolt.intervolutions.com/downloads/ivolt-starter-plain-html.zip) (zip): unzip it and open `index.html` with a double click. It works from your disk, with no server and no Node. Using React, Vue or Astro? See [using iVOLT with a framework](https://ivolt.intervolutions.com/foundations/frameworks).

## Install from npm

One command, no peer dependencies to resolve.

```src
npm install @intervolutions/ivolt
```

Pin the exact version in production. From 1.0 the package follows SemVer: what is public, and how it is allowed to change, is written down in [stability](https://ivolt.intervolutions.com/foundations/stability).

## Build the package

From a checkout, the same files the registry serves.

```src
git clone https://github.com/iNTERVOLUTIONS-Labs/iVOLT
cd iVOLT
npm ci
npm run build          # writes packages/ivolt/dist
```

## Plain HTML, no Node

Copy packages/ivolt/dist next to your page and link the files.

Add the `iv-root` class where base typography should apply; on `<html>` for a whole page, or on a wrapper when embedding into an existing site.

```src
<!DOCTYPE html>
<html lang="en" class="iv-root" data-iv-theme="system">
<head>
  <link rel="stylesheet" href="ivolt/css/ivolt.min.css">
  <script type="module" src="ivolt/js/auto.min.js"></script>
</head>
```

Opening the page with a double click (`file://`)? Browsers do not run modules from disk. Use the classic script instead, as the starter does: `ivolt/js/ivolt.iife.min.js` exposes one global, `IVOLT`, and starts nothing until you call `IVOLT.init()`.

```src
<script src="ivolt/js/ivolt.iife.min.js"></script>
<script>document.addEventListener("DOMContentLoaded", () => IVOLT.init(document));</script>
```

## ES modules with a bundler

The package exports are the public API; deep paths into dist/ are not.

```src
import "@intervolutions/ivolt/css/ivolt.css";
import { init, Dialog } from "@intervolutions/ivolt";
import { setTheme } from "@intervolutions/ivolt/theme";

init(document);                       // explicit, idempotent
const dialog = Dialog.get(document.querySelector("#signup"));
```

Importing `@intervolutions/ivolt` has no side effects; only `@intervolutions/ivolt/auto` initialises on load. Modules never touch `document` at import time, so they are safe in server-side rendering.

## Pick the CSS you need

| File | Contains |
| --- | --- |
| `css/ivolt.css` | Everything, organised in cascade layers `iv.reset, iv.tokens, iv.base, iv.layout, iv.components, iv.utilities, iv.overrides`. |
| `css/ivolt.flat.css` | Same rules without `@layer`, for sites whose existing CSS is not layered and must keep competing by specificity. |
| `css/core.css` | Tokens, base and layout only. |
| `css/components/*.css` | One file per component, unlayered. Import after `core.css`; assign a layer yourself if you use them: `@import url("…/components/button.css") layer(iv.components);` |
| `css/reset.css` | Optional normalisation. It is unlayered: import it with `@import url("…/reset.css") layer(iv.reset)`, or link `css/reset.layer.css`, which is already wrapped. |

Both sheets are on the stage above: the **flat sheet** control swaps the layered stylesheet for the unlayered one on a page that is already running.

## The font

The type stack starts with Outfit, the face this site is set in, and falls back to the system font: `"Outfit", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif`. The package does not ship font files, so unless you load Outfit your pages use the system font, which is a fine default. To use Outfit, host the file yourself (it is under the SIL Open Font License; this site serves the latin variable file, 32 KB) and declare it before the iVOLT stylesheet:

```src
@font-face {
  font-family: "Outfit";
  src: url("/fonts/Outfit-latin-variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-display: swap;
}
```

Any other face works the same way: set `--iv-font-sans` on `:root` after the stylesheet. iVOLT never fetches a font from another domain.

## Coexisting with existing CSS

Cascade layers order iVOLT's own rules; they do not isolate it. Any normal (non-`!important`) rule outside a layer beats every layered rule, whatever its specificity. A theme rule like `button { background: red }` therefore overrides `.iv-button` in `ivolt.css`. Two ways out: use `ivolt.flat.css`, or wrap the legacy stylesheet in a layer declared before iVOLT's: `@import url("theme.css") layer(legacy);`. Base element styles only apply inside `.iv-root`, so headings, links and inputs outside it are left alone.

## Browser support

Designed for Chrome and Edge 111+, Firefox 113+, Safari and iOS 16.4+, Samsung Internet 22+. The build targets these versions; container queries and `popover` are progressive enhancements. No Internet Explorer. Automated tests run in Chromium, Firefox and WebKit through Playwright, which is not the same as testing every physical device.
