Skip to content
Haze UI

Installation

Set up an Astro project with Tailwind CSS v4, register the @haze namespace, and install your first component or block.

Requirements

An Astro 5+ project using Tailwind CSS v4 via @tailwindcss/vite. Haze entries are plain .astro files and need no UI framework runtime.

1. Create or configure your Astro project

Terminal
sh
pnpm create astro@latest my-app
cd my-app
pnpm astro add tailwind

2. Add the Haze registry to components.json

Place a components.json file in your project root so the shadcn CLI knows where to fetch @haze/* entries:

components.json
json
{
  "registries": {
    "@haze": "http://localhost:4329/r/{name}.json"
  }
}

3. Install the Haze theme once

Terminal
sh
npx shadcn@latest add @haze/theme

Import src/styles/haze.css right after Tailwind in your global stylesheet:

src/styles/global.css
css
@import "tailwindcss";
@import "./haze.css";

4. Add components and blocks

Terminal
sh
npx shadcn@latest add @haze/button @haze/dialog @haze/hero-centered

Every entry installs its own .astro source, any UI primitives it imports, and the cn() helper.

Catalog

↑↓ moveEnter openEsc close

Keyboard shortcuts

CtrlK
Command palette
/
Focus search
←↑→↓
Move between cards
jk
Next / previous card
ci
Copy code / install command (detail page)
[]
Previous / next entry
?
This help
Esc
Close dialog