Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

CLI & Installation

The @glaceon/cli is a generator that downloads headless Zag.js wrappers from the component registry and writes clean TypeScript or Svelte source files directly into your project.

Run the CLI in your project root to add a component:

Terminal window
npx @glaceon/cli add button --framework react
npx @glaceon/cli add dialog --framework svelte
npx @glaceon/cli add select --framework solid

If you omit the --framework flag, the CLI prompts you interactively to choose your target framework:

Terminal window
npx @glaceon/cli add button

The CLI fetches the exact framework payload from the registry, bundles sub-components automatically (for example, CardHeader and CardContent arrive with Card), writes src/components/ui/cn.ts if it does not exist, and lists any @zag-js/* packages the machine requires.

Install the class merging utilities before adding any component:

Terminal window
npm install clsx tailwind-merge

All components use a cn helper to merge Tailwind classes without specificity conflicts:

import { clsx, type ClassValue } from "clsx";
import { twMerge } from "tailwind-merge";
export function cn(...inputs: ClassValue[]): string {
return twMerge(clsx(inputs));
}

To add just the Zag packages without the CLI:

Terminal window
bun add @zag-js/react @zag-js/<component-machine>

Each component page lists the exact Zag machine package, props reference, and full usage code.