Installation
Set up a project for oakoss/ui components.
oakoss/ui installs with the shadcn CLI into a React project with Tailwind CSS v4. This site hosts the registry, and these docs describe its latest release.
Set up the project
Run this once. The base item installs the theme, color-scheme and the
reduced-motion styles and lucide-react, and in a new project sets Lucide as
the icon library.
npx shadcn@latest init https://ui.oakoss.dev/r/base.jsonThis creates components.json with the @oakoss registry the other commands
use.
Icons that render as empty squares mean components.json names no icon
library. Set "iconLibrary": "lucide" (or another of the five, with its
package installed) and add the component again.
Give your app's root element isolation: isolate (the isolate class). Dialogs
and popovers render at the end of <body> on the --z-* scale, and the root's
own stacking context keeps z-indexes inside the app from competing with them.
Pick a theme family
The theme starts on Zinc. To use another family, add its item after base:
npx shadcn@latest add @oakoss/theme-mauveThe families are zinc, neutral, stone, mauve, olive, mist,
taupe and catppuccin. Each item sets the family's colors in light and
dark. Adding components keeps the family; adding base or theme again
resets the colors to Zinc.
Catppuccin uses Latte in light mode and Mocha in dark. For its other dark
flavors, add theme-catppuccin-frappe or theme-catppuccin-macchiato
instead. Its scales are generated from Catppuccin's colors, keeping each
published color at the step nearest its lightness.
To pick a primary color and corner radius as well, use the theme panel (the palette button in the sidebar). It restyles this site's component previews and gives the command that installs the same theme.
Color Tokens lists every color each family sets, and Token Names explains how the names are built.
Switch themes at runtime
To let users switch families and primary colors while the app runs, add the
themes item after base. In a project set up with another theme instead,
add it without base: it keeps that theme's values and adds only the tokens
the theme lacks.
npx shadcn@latest add @oakoss/themesIt installs styles/themes.css (177 KB, 15 KB gzipped) in src/, or at the
project root when there's no src/, and adds @import "./styles/themes.css";
to your stylesheet. The import is relative to the stylesheet, so it suits a
Vite app's src/index.css. Elsewhere, such as Next.js's app/globals.css or
React Router's app/app.css, point it at the installed file
(../styles/themes.css); the build fails until you do.
Then set data-family and data-primary on <html> or on any element,
alongside the dark class:
<html data-family="catppuccin" data-primary="blue" class="dark"></html>- Pick a primary the family offers; Color Tokens
lists them. A family's own version of a color, such as Catppuccin's blue,
applies only when
data-primarysits on the same element asdata-family. - The theme's selectors outrank
:rootand.dark, so a class that sets a theme color on the same element loses to them. - Adding the item again asks before replacing a
themes.cssyou've edited, and leaves it alone without a terminal; pass--overwriteto replace it.
Add components
npx shadcn@latest add @oakoss/buttonEach page lists its own command. The files land in your project, so you can edit them freely.
Pin a release
/r/ always serves the latest release. To stay on one, point the registry at
its folder, /v<version>/r/, such as v0.5.0's:
{ "registries": { "@oakoss": "https://ui.oakoss.dev/v0.5.0/r/{name}.json" } }Every item and its dependencies then come from that release, until you change the version. The changelog lists what each release changed.
To try a component before it's released, add it from the repository's main
branch:
npx shadcn@latest add oakoss/ui/buttonIts dependencies come from main too. The CLI asks before replacing shared
files your release installed, such as lib/cx.ts, and a component from main
may need the newer ones; pass --overwrite to take them all.