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.

Coloxo CLI (recommended)
# 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 button

The 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/ui
First import (@coloxo/ui)
import { 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.

Add one visual
npx coloxo add vortexnpx coloxo add aurora-mesh-gradient

The 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:

Stylesheet and optional package import
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.

app/providers.tsx
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.

PackageVersionNotes
react^18.0.0 || ^19.0.0Required peer
react-dom^18.0.0 || ^19.0.0Required 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 install

Installs @coloxo/ui 1.0.6.

Start the docs site

npm run dev

http://localhost:3000

Production build

npm run build

Next.js production build.

Serve the build

npm start

After npm run build.