Get started
Installation
Two commands: init sets up the theme once, add copies a component into your project. The files are yours to edit.
Not on npm yet
aback-ui, @aback-ui/ui, and @aback-ui/tokens are built and tested but have not been published. The commands on this page work from the first release.- React 19The components are written and tested against React 19.
- Tailwind CSS v4The theme uses v4's @theme inline. init stops on v3.
- A @/ path aliasInstalled files import @/components/ui and @/lib/utils.
Any React framework works. The CLI recognizes Next.js, Vite, Remix, and Astro and picks sensible defaults for each.
Create a project
Skip this step for an existing project. A new Next.js app comes with TypeScript, Tailwind CSS v4, and the
@/alias already configured:npx create-next-app@latest my-app --yesRun init
Run this once, in the project root:
npx aback-ui@latest initIt finds your global stylesheet, adds the Aback theme, and installs the two packages the class helper needs. See exactly what it changes.
Add a component
npx aback-ui@latest add buttonThe source lands in
components/ui/button.tsx, undersrc/if your project has one. Components that build on others bring them along:add dialogalso installs Button. Add several at once withadd button dialog field.Use it
app/page.tsxtsx import { Button } from "@/components/ui/button"; export default function Page() { return <Button>Save changes</Button>; }The default button is neutral ink. Use
variant="brand"for a brand action, and keep one primary action per surface.
What init changes
Nothing outside this list is touched. Add --dry-run to see the plan without writing.
| File | Change |
|---|---|
| aback-ui.json | New. Records your aliases and stylesheet so later commands know where files go. |
| styles/aback.css | New. The theme: colour roles for light and dark, the Aback Blue ramp, and square geometry. |
| lib/utils.ts | New. The cn() class helper every component imports. |
| Your global stylesheet | One line added after the Tailwind import: @import of styles/aback.css. |
| package.json | clsx and tailwind-merge added, through the package manager your lockfile uses. |
@import "tailwindcss";
@import "../styles/aback.css";npx aback-ui@latest init --css src/index.css. Files that already exist are kept unless you confirm the overwrite.aback-ui add sign-inInstall a block. It lands in components/blocks with every component it uses.aback-ui list formsSearch what you can install, grouped by category.aback-ui diff --allSee how your copies differ from the current version before you update.aback-ui doctorCheck the setup: Tailwind, aliases, theme import, and installed files.Every command and option is in the CLI reference.