The CSS you already love — supercharged.
Variants, slots, tokens, and theming. Compiles to plain CSS and typed APIs with zero runtime.
Docs · Playground · Quick start
Write styles in .arv files — ordinary modules you import like any other — and Arvia turns them into hashed CSS plus a small typed export. Nothing styling-related runs in the browser.
import { color, space } from "./theme.arv"
component Button {
base {
display: inline-flex
padding: space.2 space.4
border-radius: radius.md
background: color.primary
color: white
border: none
cursor: pointer
}
variant tone: primary {
primary { background: color.primary }
danger { background: color.danger }
}
variant size: sm {
sm { font-size: font.sm; padding: space.1 space.3 }
lg { font-size: font.lg; padding: space.3 space.5 }
}
}
import { Button } from "./button.arv";
const styles = Button({ tone: "danger", size: "lg" });
export function DeleteButton() {
return <button className={styles.root}>Delete</button>;
}- Language, not a JS API — tokens, variants, slots,
whencompounds, and CSS nesting read like CSS with structure. - Compile-time only — every class name and rule exists before your app starts.
- Framework-agnostic — plain
class/className/:classconsumers; React, Preact, Vue, or anything else. - Typed by default — variant props and slot maps typecheck in the editor.
Pick the Vite entrypoint for your framework (plugin + CLI + TypeScript wiring):
npm install -D @arviahq/vite-plugin-react// vite.config.ts
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { arvia } from "@arviahq/vite-plugin-react";
export default defineConfig({
plugins: [arvia(), react()],
});npm install -D @arviahq/vite-plugin-preact @preact/preset-vite preact// vite.config.ts
import { defineConfig } from "vite";
import preact from "@preact/preset-vite";
import { arvia } from "@arviahq/vite-plugin-preact";
export default defineConfig({
plugins: [arvia(), preact()],
});npm install -D @arviahq/vite-plugin-vue @vitejs/plugin-vue vue// vite.config.ts
import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
import { arvia } from "@arviahq/vite-plugin-vue";
export default defineConfig({
plugins: [arvia(), vue()],
});Use arvia-tsc (shipped with the Vue plugin) instead of vue-tsc so .arv imports inside SFCs typecheck.
@arviahq/vite-plugin is the framework-agnostic core. Pair it with Svelte, Solid, Lit, or server-rendered templates.
Full setup: arvia.dev/docs/quick-start.
| Construct | What it does |
|---|---|
token |
Named value groups (color.primary, space.4); optional modes + @dark |
style |
One exported class; composes inlines another style |
component |
Slots + variant axis: default { … } + when compounds |
contract / theme … implements |
Typed, coexisting skins |
keyframes / global / raw |
Motion, document CSS, and escape hatches |
Coming from 0.x? See Coming from Arvia 0.x — recipe / use, defaults { }, and ambient theme { } are gone.
pnpm install
pnpm websiteOpen localhost:5173 — or use the live site at arvia.dev (docs + interactive playground).
- VS Code / Cursor — marketplace (
code --install-extension arviahq.arvia) - Zed —
packages/zed-extension - Neovim & others —
packages/tree-sitter-arvia+@arviahq/language-server
| Package | Install? | Purpose |
|---|---|---|
@arviahq/vite-plugin-react |
yes | React + Vite entrypoint |
@arviahq/vite-plugin-preact |
yes | Preact + Vite entrypoint |
@arviahq/vite-plugin-vue |
yes | Vue + Vite entrypoint (+ Vue-aware arvia-tsc) |
@arviahq/vite-plugin |
agnostic | Core Vite plugin + arvia CLI |
@arviahq/typescript-plugin |
tsserver plugin + arvia-tsc |
|
@arviahq/compiler |
Core compiler | |
@arviahq/runtime |
Shared recipe helpers for large components | |
@arviahq/language-server |
LSP for .arv |
|
@arviahq/storybook |
Storybook story generator | |
@arviahq/docs |
Token catalog generator | |
| VS Code extension | marketplace | Highlighting, diagnostics, completion |
pnpm install
pnpm build
pnpm testLocal playground: examples/demo. Releases: PUBLISHING.md.
Arvia owes a great deal to vanilla-extract — build-time CSS, typed themes, and the recipes/variants mental model inspired the language.
MIT
