Get started
Installation
Ochre runs on Tailwind CSS v4 plus three small stylesheets: the tokens, their Tailwind mapping and the motion curves. Set those up once, then add components one at a time.
1. Add the tokens
ochre.css holds every token as a CSS variable, in Light, Dark and five colour schemes. ochre-tailwind.css maps them onto Tailwind, so classes like bg-surface-card and text-text-muted work. ochre-motion.css adds the motion curves and motion utilities the components use. Download them, or let the shadcn CLI add all three:
npx shadcn@latest add http://localhost:3800/r/ochre-theme.json
Or download ochre.css, ochre-tailwind.css and ochre-motion.css. Then import all three after Tailwind in your global stylesheet:
@import "tailwindcss";
@import "../styles/ochre.css";
@import "../styles/ochre-tailwind.css";
@import "../styles/ochre-motion.css";
body {
background: var(--surface-canvas);
color: var(--text-default);
font-family: var(--font-sans);
}
2. Load the fonts
Host Grotesk for text and JetBrains Mono for numbers, code and labels. Both are free on Google Fonts. In Next.js:
import { Host_Grotesk, JetBrains_Mono } from "next/font/google";
const sans = Host_Grotesk({ subsets: ["latin"], variable: "--family-sans" });
const mono = JetBrains_Mono({ subsets: ["latin"], variable: "--family-mono" });
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en" className={`${sans.variable} ${mono.variable}`}>
<body>{children}</body>
</html>
);
}
3. Add components
React and Next.js
Components live in components/ochre/ and import each other as @/components/ochre/…, the same alias shadcn uses. With the @ochre registry in components.json, one command brings a component and everything it needs:
npx shadcn@latest add @ochre/button @ochre/input @ochre/modal
Prefer to copy? Open any component, switch the code to React and paste it into the file named above the code.
Vue
Vue 3.5 with Vite and @tailwindcss/vite. Import the same three stylesheets, then copy each component's Vue version into components/ochre/. Icons come from lucide-vue-next.
npm install tailwindcss @tailwindcss/vite lucide-vue-next
Plain HTML
The HTML versions use the same classes, so any Tailwind v4 build works. Compile your stylesheet with the Tailwind CLI, importing the three stylesheets:
npx @tailwindcss/cli -i ./styles/app.css -o ./dist/app.css --watch
Dark mode and schemes
Light is the default. Set data-theme="dark" on <html>, or on any element, and everything inside follows. Colour schemes work the same way with data-scheme: ochre, cobalt, violet, jade or rose. They nest, so a dark panel can sit in a light page. Never pick dark colours by hand with dark: classes; the tokens already change.
<html data-theme="dark" data-scheme="cobalt">
…
<aside data-theme="light">A light panel inside a dark page</aside>
</html>