Getting started
Install @coloxo/ui 1.0.6, add optional visuals in either style, and wire ThemeProvider.
Overview
Coloxo uses a copy-source model: the CLI copies components from the registry into your codebase so you own the files. Run init once, then add components by slug.
Every component ships in one or both styles: Coloxo CSS (CSS Modules over semantic design tokens) or Tailwind (flat TSX with the classes inlined). You choose at init with --style, and the same command works for both. See the styling guide for which components support which style.
This site runs on @coloxo/ui 1.0.6. Start it with npm run dev in the playground.
Install
Initialize Coloxo in your React project, then add components. Each add copies source files and registry dependencies into paths defined in coloxo.json.
# init asks for a style and saves it to coloxo.jsonnpx coloxo init# or choose up front: --style coloxo-css | tailwindnpx coloxo init --style tailwindnpx coloxo add buttonThe style you pick at init becomes the default for every later coloxo add. Pass --style on a single add to override it. Without Tailwind detected in your project, init defaults to Coloxo CSS.
Or install the package and import from @coloxo/ui. This site uses @coloxo/ui 1.0.6.
npm install @coloxo/uiimport { Button, ThemeProvider } from "@coloxo/ui";import "@coloxo/ui/styles.css";Visuals
Shader and canvas visuals are optional. coloxo init does not install them. Add one slug when you want it. The same command works in a Tailwind project and in a Coloxo CSS project, because every visual ships as Coloxo CSS.
npx coloxo add vortexnpx coloxo add aurora-mesh-gradientThe CLI copies that effect into your project and adds @coloxo/ui to package.json, so the stylesheet is restored on the next npm install. Import it once:
import "@coloxo/ui/styles.css";import { WaveBackground } from "@coloxo/ui/visuals";ThemeProvider
Wrap your application root so light, dark, and system themes apply via data-cx-theme and persisted preferences.
import { ThemeProvider } from "@coloxo/ui";import "@coloxo/ui/styles.css";export function Providers({ children }: { children: React.ReactNode }) { return <ThemeProvider defaultTheme="system">{children}</ThemeProvider>;}Peer dependencies
Ensure compatible React versions are installed in the host app.
| Package | Version | Notes |
|---|---|---|
| react | ^18.0.0 || ^19.0.0 | Required peer |
| react-dom | ^18.0.0 || ^19.0.0 | Required peer |
Run this site
Commands for the documentation site. It renders @coloxo/ui 1.0.6, including the optional visuals entry.
Install this site
npm installInstalls @coloxo/ui 1.0.6.
Start the docs site
npm run devhttp://localhost:3000
Production build
npm run buildNext.js production build.
Serve the build
npm startAfter npm run build.