Skip to content
Haze UI

Introduction & Architecture

Why Haze UI ships 376 plain .astro blocks and UI primitives instead of a hydrated React runtime package.

Core architectural principles

  • Plain .astro source files you own

    No npm runtime wrapper or React dependency. Running shadcn add copies the component source directly into your src/ folder so you can edit markup and props freely.

  • Native HTML interactivity first

    Modals use <dialog> with command/commandfor, menus and popovers use popover with CSS anchor positioning, and accordions use <details name>. Progressive scripts only enhance ARIA state and keyboard shortcuts.

  • Opaque OKLCH tokens across dark and light modes

    Surfaces and borders use perceptual OKLCH values generated from tokens/haze.tokens.json, ensuring zero bright border seams and automated WCAG 2.2 AA contrast across 312 tested pairs.

  • Built-in agent layer

    Every entry publishes typed metadata, use-when/avoid-when rules, /llms.txt links, /DESIGN.md rules, and a standalone .md twin so coding tools install accurately.

The portable subset

Every component inside src/components/haze/ adheres to strict portability rules checked on every build by pnpm check:portable and pnpm check:vocab. Templates avoid framework-bound helpers, avoid <style> blocks and raw colors, derive unique IDs from props, and keep responsive layouts overflow-free down to 320 px.

Where to read next

Follow Installation to configure components.json, explore Theming for OKLCH customization, read DESIGN.md for token rules, or dive into the 12 engineering articles in Guides.

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