HeroUI v3 is a component library built on **Tailwind CSS v4** and **React Aria Components**, providing accessible, customizable UI components for React applications. * * * **This guide is for HeroUI v3 ONLY.** Do NOT use any prior knowledge of HeroUI v2.
<HeroUIProvider> requiredframer-motion package<Card title="x"><Card><Card.Header>@heroui/theme@heroui/styles@beta@heroui/system, @heroui/theme@heroui/react@beta, @heroui/styles@beta// DO NOT DO THIS - v2 pattern import { HeroUIProvider } from "@heroui/react"; import { motion } from "framer-motion"; <HeroUIProvider> <Card title="Product" description="A great product" /> </HeroUIProvider>; `### CORRECT (v3 patterns)` // DO THIS - v3 pattern (no provider, compound components) import { Card } from "@heroui/react@beta"; <Card> <Card.Header> <Card.Title>Product</Card.Title> <Card.Description>A great product</Card.Description> </Card.Header> </Card>;
primary, secondary, tertiary) over visual descriptionsoklch color space# List all available components node scripts/list_components.mjs # Get component documentation (MDX) node scripts/get_component_docs.mjs Button node scripts/get_component_docs.mjs Button Card TextField # Get component source code node scripts/get_source.mjs Button # Get component CSS styles (BEM classes) node scripts/get_styles.mjs Button # Get theme variables node scripts/get_theme.mjs # Get non-component docs (guides, releases) node scripts/get_docs.mjs /docs/react/getting-started/theming
https://v3.heroui.com/docs/react/components/{component-name}.mdxhttps://v3.heroui.com/docs/react/components/button.mdxhttps://v3.heroui.com/docs/react/components/modal.mdxhttps://v3.heroui.com/docs/react/components/form.mdxhttps://v3.heroui.com/docs/react/getting-started/{topic}.mdx@beta tag when installing packages.npm i @heroui/styles@beta @heroui/react@beta tailwind-variantsnpm i @heroui/styles@beta @heroui/react@beta tailwind-variants tailwindcss @tailwindcss/postcss postcssapp/globals.css:/* Tailwind CSS v4 - Must be first */ @import "tailwindcss"; /* HeroUI v3 styles - Must be after Tailwind */ @import "@heroui/styles"; `3. **Import in `app/layout.tsx`:**` import "./globals.css"; export default function RootLayout({ children, }: { children: React.ReactNode; }) { return ( <html lang="en" suppressHydrationWarning> <body> {/* No Provider needed in HeroUI v3! */} {children} </body> </html> ); } `4. **Configure PostCSS (`postcss.config.mjs`):**` export default { plugins: { "@tailwindcss/postcss": {}, }, };
Card.Header, Card.Content)onPress event handlers<Card> <Card.Header> <Card.Title>Title</Card.Title> <Card.Description>Description</Card.Description> </Card.Header> <Card.Content>{/* Content */}</Card.Content> <Card.Footer>{/* Actions */}</Card.Footer> </Card>
Card.Header)primarysecondarytertiarydangerghostoutlineoklch color space::root { --accent: oklch(0.6204 0.195 253.83); --accent-foreground: var(--snow); --background: oklch(0.9702 0 0); --foreground: var(--eclipse); } `**Get current theme variables:**` node scripts/get_theme.mjs
--accent)-foreground = text color (e.g., --accent-foreground)<html data-theme="dark"></html>https://v3.heroui.com/docs/react/getting-started/theming.mdx