Astro

Install Cubix in Astro with React islands.

Choose the setup that matches your starting point.

Create project

Run init with the Astro template. Cubix scaffolds Astro with Tailwind CSS and the React integration, adds the @/* alias, then writes tokens and cubix.json.

pnpm dlx cubix-ui@latest init -t astro

Follow the prompts for project name and options. Default base is Base UI. Pass --base aria or --base radix if your team standardizes on React Aria or Radix UI.

Add a component

Components are copied into your components/cubix folder as TypeScript source you own.

pnpm dlx cubix-ui@latest add button

Then import from your local path:

src/pages/index.astro
---
import "@/styles/global.css"
import { Button } from "@/components/cubix/button"
---

<div class="grid min-h-screen place-items-center">
  <Button client:load>Get started</Button>
</div>

Next steps

Prefer a different host? See all options on the Installation page.