Installation

Set up the design system once, then add components as you need them.

1. Init

Copies base utilities, direction helpers, and styles/sonojs.css tokens into your project. It also wires your globals.css Tailwind entry: imports SonoJS, pins @theme / @source, and removes create-next-app prefers-color-scheme :root colors so dark mode stays class-based (.dark only). Restart the dev server after init if styles look stale.

Terminal
npx @sonojs/ui@latest init

2. Add a component

Installs the source file and any required registry or npm dependencies.

Terminal
npx @sonojs/ui@latest add button