Loading...
Loading...
HeroUI v3 React component library (Tailwind CSS v4 + React Aria). Use when working with HeroUI components, installing HeroUI, customizing HeroUI themes, or accessing HeroUI component documentation. Keywords: HeroUI, Hero UI, heroui, @heroui/react, @heroui/styles.
npx skill4agent add heroui-inc/heroui heroui-react| Feature | v2 (DO NOT USE) | v3 (USE THIS) |
|---|---|---|
| Provider | | No Provider needed |
| Animations | | CSS-based, no extra deps |
| Component API | Flat props: | Compound: |
| Styling | Tailwind v3 + | Tailwind v4 + |
| Packages | | |
// 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>;// 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>;primarysecondarytertiaryoklch# 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/theminghttps://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@betanpm 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";app/layout.tsximport "./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>
);
}postcss.config.mjsexport default {
plugins: {
"@tailwindcss/postcss": {},
},
};Card.HeaderCard.ContentonPress<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| Variant | Purpose | Usage |
|---|---|---|
| Main action to move forward | 1 per context |
| Alternative actions | Multiple |
| Dismissive actions (cancel, skip) | Sparingly |
| Destructive actions | When needed |
| Low-emphasis actions | Minimal weight |
| Secondary actions | Bordered style |
oklch:root {
--accent: oklch(0.6204 0.195 253.83);
--accent-foreground: var(--snow);
--background: oklch(0.9702 0 0);
--foreground: var(--eclipse);
}node scripts/get_theme.mjs--accent-foreground--accent-foreground<html class="dark" data-theme="dark"></html>https://v3.heroui.com/docs/react/getting-started/theming.mdx