Installation
Install heyo-ui, import one line of CSS, and render the first component.
Loading documentation…
heyo-ui is published as a compiled package. There is no CLI, no generator and no code to copy into your repository — you install it like any other dependency and import from it.
| Requirement | Version |
|---|---|
| React | ^19.0.0 — peer dependency, ref-as-prop throughout |
| Tailwind CSS | ^4.1.0 — peer dependency, tokens declared with @theme |
| Bundler | Anything with exports support: Vite, Next.js, Rspack, Parcel |
Base UI, clsx, class-variance-authority and tailwind-merge are bundled as
regular dependencies. You never install or configure them.
One line in your CSS, and the setup is finished.
That import pulls in Tailwind for you. If your application already imports Tailwind itself, take the tokens only:
Tailwind skips node_modules when it auto-detects content, so without a
source registration every heyo-ui class would be tree-shaken out of your
build. Both entry points bake that directive into the shipped stylesheet, so
your setup stays a single @import line.
Every module ships with a "use client" banner, so components drop into the
Next.js App Router and React Server Components without a wrapper.
The barrel is the simplest option and tree-shakes correctly in any modern bundler. Per-component entry points exist when you would rather be explicit.
Set data-mode on any ancestor — usually <html>. Omit it and the components
follow the operating system.
That is the entire theming API. Theming covers the tokens behind it.
| Framework | What to do |
|---|---|
| Next.js (App Router) | Import the stylesheet from app/globals.css. Components carry "use client", so a server component renders them. |
| Vite / React Router | Import the stylesheet once from the entry module. Nothing else is needed. |
| Astro | Render heyo-ui inside a React island; interactive components need a client directive. |
Pick a component from the sidebar, or read Design rules for the ten rules every component in the library follows.