Menu

Installation

Create an app, run init, add the components you want. It takes about a minute.

Requirements

  • React 18 or 19.
  • Tailwind CSS v4. The CLI stops if it finds v3.
  • Node 18 or newer to run the CLI. It has no dependencies of its own.

Create your app

Pick your framework. If you already have an app, you can skip this step.

Say yes to Tailwind CSS when it asks.

$ npx create-next-app@latest my-app

Set up the theme

Run init in your app folder. Choose a theme with --preset; browse them on the themes page. Leave the flag out for the UIX default.

$ npx uix-ui@latest init --preset lagoon-stretch
Output
  wrote   components.json
  wrote   src/styles/uix.css
  fonts   Sora, Plus Jakarta Sans, JetBrains Mono → index.html
  updated src/index.css
  wrote   src/lib/utils.ts

Done. Next: npx uix-ui add button card input
Dark mode: <html data-theme="dark">. Other presets: npx uix-ui theme <preset>.

What init writes

WhereWhatGood to know
components.jsonAdds the @uix and @uix-pro registries. A new file also gets the usual shadcn-style aliases.An existing file is kept; only the registries are added.
src/styles/uix.cssThe theme: colours in light and dark, type scale, spacing, radius, shadows.Rewritten by init and by theme. Put your own changes in your own CSS.
Your main CSS fileAn @import of the theme, right after @import "tailwindcss".The first of src/index.css, src/app/globals.css, app/globals.css, src/styles/globals.css, src/main.css that exists. If none does, src/index.css is created.
src/lib/utils.tsThe cn() helper.Not overwritten if it already exists.
index.htmlGoogle Fonts links for the theme, between <!-- uix-fonts --> markers.Only when an index.html exists (Vite). Other setups get the links printed.
Dependenciesclsx and tailwind-merge, if missing.Installed with the package manager your lockfile points to. Pass --no-install to only print the command.

If your project has a src folder, files go in it. Otherwise they go in the project root.

Add components

Name the components you need. Anything they depend on comes along, and missing packages are installed for you.

$ npx uix-ui@latest add button badge
Output
  wrote   src/components/ui/button.tsx
  wrote   src/components/ui/icons.tsx
  wrote   src/components/ui/badge.tsx

npm install class-variance-authority

Components import each other with relative paths, so you do not need an @/ alias in your tsconfig. Add --overwrite to replace files that already exist.

Use a component

Import it from the folder it was copied to and use it like any other React component.

Paid
Interactive components are marked "use client", so they work in Next.js with Server Components.

If a command stops

MessageWhyFix
no components.json hereYou ran add or theme before init.Run uix-ui init first.
UIX themes need Tailwind CSS v4 (found v3)Your package.json lists Tailwind CSS 3.Upgrade to Tailwind CSS v4, then run init again.
run this in your app folderThere is no package.json in the current folder.cd into your app and run the command again.

Next: theming, or the full list of commands.

esc

↑↓ to navigate · ↵ to select · esc to close