Getting started
Haze UI ships 376 Astro blocks and components as plain .astro files. You own the code after install, and there is no runtime package. Today every entry targets Astro. The blocks follow portable rules, and ports to other frameworks are planned but not yet available.
1. Requirements
An Astro project with Tailwind CSS v4 (npx astro add tailwind). React is not required.
2. Add the registry
Create or extend components.json in the project root:
{
"registries": {
"@haze": "http://localhost:4329/r/{name}.json"
}
}3. Install the theme (once)
npx shadcn@latest add @haze/themeThis writes src/styles/haze.css. Import it after Tailwind in your global CSS, and edit it freely: blocks never reinstall it.
@import "tailwindcss";
@import "./haze.css";4. Install blocks and components
npx shadcn@latest add @haze/hero-centered @haze/dialog @haze/tabsThe CLI writes each entry, the UI components it uses and the cn() helper, and installs the npm dependencies. It skips files that are already identical.
When a file already exists and differs, the CLI stops and asks before overwriting it, even with --yes. That happens when you edited a Haze file, and also when Haze has since updated a component you installed earlier (for example a newer button.astro). Answer no to keep your version, or yes to take the new one. In a run with no terminal to answer in, the command exits without installing the remaining files, so check its output.
5. Update to newer versions
npx shadcn@latest add @haze/theme @haze/button --overwrite--overwrite replaces the listed files and the components they depend on with the registry versions, without asking. Use it for files you have not customized, and commit first so you can review the diff. Re-run it for @haze/theme when new entries need tokens your haze.css does not have yet, such as --success and --warning.
6. Use Haze with your coding agent
Any agent that can run a shell can install Haze entries with the commands above, and every entry page has copyable agent prompts. Agents can also read /llms.txt, /llms-full.txt or the Markdown twin of any page (append .md to a block URL). The registry index lives at /r/registry.json.
The official shadcn MCP server is documented to read the registries in components.json, but Haze has not been tested with it yet. For Claude Code it is configured like this:
{
"mcpServers": {
"shadcn": { "command": "npx", "args": ["shadcn@latest", "mcp"] }
}
}