Installation
Two minutes of setup, then every component works with your theme. Pick your package manager once; every command on the site follows.
With shadcn
If your project already uses shadcn, skip this. Otherwise run its init once; it adds the color tokens and the cn helper.
$npx shadcn@latest initTell shadcn where @stillui lives by adding it to the registries in your components.json. This is the only setup, and it goes away once @stillui is listed in shadcn’s registry directory.
components.json
{
"registries": {
"@stillui": "https://stillui.netlify.app/r/{name}.json"
}
}Then install any component by name. Its dependencies come with it.
$npx shadcn@latest add @stillui/buttonWithout shadcn
Install the two packages the helper and the motion use, add the helper, then paste the theme tokens below your Tailwind import.
$npm install motion clsx tailwind-mergelib/utils.ts
import { clsx, type ClassValue } from "clsx";
import { twMerge } from "tailwind-merge";
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}app/globals.css (below the Tailwind import)
/*
Still UI tokens.
Roles follow shadcn names so components work in any shadcn project.
Values are OKLCH so lightness steps look even (Albers, Weber–Fechner).
Neutrals carry a faint cool tint (hue 260) — Refactoring UI, "greys don't have to be grey".
*/
@custom-variant dark (&:where(.dark, .dark *));
:root {
--background: oklch(99.2% 0.002 260);
--foreground: oklch(21% 0.006 260);
/* Layers: light themes alternate two near-whites (Carbon). */
--card: oklch(100% 0 0);
--card-foreground: var(--foreground);
--popover: oklch(100% 0 0);
--popover-foreground: var(--foreground);
--muted: oklch(96.4% 0.003 260);
--muted-foreground: oklch(48% 0.01 260); /* secondary text, APCA ≥ Lc 60 on background */
--faint-foreground: oklch(64% 0.008 260); /* placeholder, disabled, fine print only */
--primary: oklch(23% 0.008 260);
--primary-foreground: oklch(98.5% 0.002 260);
--secondary: oklch(93.4% 0.005 260);
--secondary-foreground: var(--foreground);
--accent: oklch(93.4% 0.005 260);
--accent-foreground: var(--foreground);
--destructive: oklch(55% 0.2 27);
--success: oklch(56% 0.13 155);
--border: oklch(91.5% 0.004 260);
--input: oklch(88% 0.005 260);
--ring: oklch(62% 0.01 260);
--radius: 0.625rem;
/* Elevation: two-part shadows, the tight one fades as elevation rises (Refactoring UI). */
--shadow-raised: 0 1px 2px oklch(20% 0.01 260 / 0.08), 0 1px 1px oklch(20% 0.01 260 / 0.04);
--shadow-overlay: 0 12px 32px -8px oklch(20% 0.01 260 / 0.16), 0 2px 6px oklch(20% 0.01 260 / 0.05);
}
.dark {
--background: oklch(17% 0.004 260);
--foreground: oklch(95% 0.003 260);
/* Dark themes: each layer one step lighter (Carbon, Atlassian). */
--card: oklch(20.5% 0.005 260);
--popover: oklch(23% 0.005 260);
--muted: oklch(22.5% 0.005 260);
--muted-foreground: oklch(72% 0.008 260);
--faint-foreground: oklch(56% 0.008 260);
--primary: oklch(94% 0.003 260);
--primary-foreground: oklch(19% 0.005 260);
--secondary: oklch(28.5% 0.006 260);
--accent: oklch(28.5% 0.006 260);
--destructive: oklch(66% 0.19 25);
--success: oklch(70% 0.14 155);
--border: oklch(27% 0.006 260);
--input: oklch(31% 0.007 260);
--ring: oklch(58% 0.01 260);
--shadow-raised: 0 1px 2px oklch(0% 0 0 / 0.4);
--shadow-overlay: 0 16px 40px -8px oklch(0% 0 0 / 0.55), 0 0 0 1px oklch(100% 0 0 / 0.06);
}
@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--color-card: var(--card);
--color-card-foreground: var(--card-foreground);
--color-popover: var(--popover);
--color-popover-foreground: var(--popover-foreground);
--color-muted: var(--muted);
--color-muted-foreground: var(--muted-foreground);
--color-faint-foreground: var(--faint-foreground);
--color-primary: var(--primary);
--color-primary-foreground: var(--primary-foreground);
--color-secondary: var(--secondary);
--color-secondary-foreground: var(--secondary-foreground);
--color-accent: var(--accent);
--color-accent-foreground: var(--accent-foreground);
--color-destructive: var(--destructive);
--color-success: var(--success);
--color-border: var(--border);
--color-input: var(--input);
--color-ring: var(--ring);
--radius-sm: calc(var(--radius) - 4px);
--radius-md: calc(var(--radius) - 2px);
--radius-lg: var(--radius);
--radius-xl: calc(var(--radius) + 4px);
--shadow-raised: var(--shadow-raised);
--shadow-overlay: var(--shadow-overlay);
--font-sans: var(--font-geist-sans), ui-sans-serif, system-ui, sans-serif;
--font-mono: var(--font-geist-mono), ui-monospace, monospace;
/* Motion: ease-out for entrances, ease-in-out for on-screen movement (Material 3, beUI). */
--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
--ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}