heroui-react
यह क्या करती है
यह स्किल React के लिए HeroUI वर्ज़न 3 कॉम्पोनेंट लाइब्रेरी से वेब इंटरफ़ेस बनाने का मार्गदर्शन देती है। इसमें इंस्टॉलेशन, थीम सेटअप और कंपाउंड कॉम्पोनेंट संरचना कैसे इस्तेमाल करें, यह शामिल है।
कब इस्तेमाल करें
- ✓जब आप HeroUI कॉम्पोनेंट के साथ React वेब पेज या ऐप बना रहे हों।
- ✓जब आप HeroUI वेब प्रोजेक्ट के लिए लाइट और डार्क थीम सेट करना चाहें।
- ✓जब आपको किसी HeroUI कॉम्पोनेंट, जैसे मॉडल या फ़ॉर्म, का दस्तावेज़ चाहिए।
Skill का लिंक
https://github.com/heroui-inc/heroui/blob/v3/skills/heroui-react/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“HeroUI v3 कॉम्पोनेंट से React में एक संपर्क फ़ॉर्म पेज बनाइए, जिसमें डार्क मोड का विकल्प हो।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट पहले वर्ज़न 3 का दस्तावेज़ पढ़ता है, क्योंकि पुराने वर्ज़न 2 के पैटर्न अब लागू नहीं होते। वह लाइब्रेरी इंस्टॉल करता है, थीम सेट करता है, और कंपाउंड संरचना से कॉम्पोनेंट लिखता है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
HeroUI v3 React Development Guide
HeroUI v3 is a component library built on Tailwind CSS v4 and React Aria Components, providing accessible, customizable UI components for React applications.
Installation
curl -fsSL https://heroui.com/install | bash -s heroui-react
CRITICAL: v3 Only - Ignore v2 Knowledge
This guide is for HeroUI v3 ONLY. Do NOT apply v2 patterns — the provider, styling, and component API all changed:
| Feature | v2 (DO NOT USE) | v3 (USE THIS) |
|---|---|---|
| Provider | <HeroUIProvider> required |
No Provider needed |
| Animations | framer-motion package |
CSS-based, no extra deps |
| Component API | Flat props: <Card title="x"> |
Compound: <Card><Card.Header> |
| Styling | Tailwind v3 + @heroui/theme |
Tailwind v4 + @heroui/styles |
| Packages | @heroui/system, @heroui/theme |
@heroui/react, @heroui/styles |
// 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";
<Card>
<Card.Header>
<Card.Title>Product</Card.Title>
<Card.Description>A great product</Card.Description>
</Card.Header>
</Card>;
Always fetch v3 docs before implementing.
Core Principles
- Semantic variants (
primary,secondary,tertiary) over visual descriptions - Composition over configuration (compound components)
- CSS variable-based theming with
oklchcolor space - BEM naming convention for predictable styling
Accessing Documentation & Component Information
For component details, examples, props, and implementation patterns, always fetch documentation:
Using Scripts
# 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
Direct MDX URLs
Component docs: fetch .mdx with a concrete kebab-case slug. Run node scripts/list_components.mjs when the slug is unknown, and never fetch a URL that still contains a placeholder.
Examples:
- Button:
https://heroui.com/docs/react/components/button.mdx - Modal:
https://heroui.com/docs/react/components/modal.mdx - Form:
https://heroui.com/docs/react/components/form.mdx
Getting started guides: use a concrete topic URL such as https://heroui.com/docs/react/getting-started/quick-start.mdx.
Important: Always fetch component docs before implementing. The MDX docs include complete examples, props, anatomy, and API references.
Installation Essentials
Quick Install
npm i @heroui/styles @heroui/react tailwind-variants
Framework Setup (Next.js App Router - Recommended)
- Install dependencies:
npm i @heroui/styles @heroui/react tailwind-variants tailwindcss @tailwindcss/postcss postcss
- Create/update
app/globals.css:
/* Tailwind CSS v4 - Must be first */
@import "tailwindcss";
/* HeroUI v3 styles - Must be after Tailwind */
@import "@heroui/styles";
- 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>
);
}
- Configure PostCSS (
postcss.config.mjs):
export default {
plugins: {
"@tailwindcss/postcss": {},
},
};
Critical Setup Requirements
- Tailwind CSS v4 is MANDATORY - HeroUI v3 will NOT work with Tailwind CSS v3
- Use Compound Components - Components use compound structure (e.g.,
Card.Header,Card.Content) - **Use o
अक्सर पूछे जाने वाले सवाल
क्या मुझे प्रोवाइडर रैपर चाहिए?
नहीं। वर्ज़न 3 को प्रोवाइडर कॉम्पोनेंट की ज़रूरत नहीं होती।
कार्ड की संरचना कैसी होती है?
कार्ड हिस्सों से बनते हैं, जैसे हेडर, उदाहरण के लिए Card रैपर के भीतर Card.Header भाग।
क्या यह Tailwind CSS इस्तेमाल करती है?
हाँ। यह HeroUI स्टाइल पैकेज के साथ Tailwind वर्ज़न 4 इस्तेमाल करती है।
जानकारी
लेखक का मूल विवरण
HeroUI v3 React component library (Tailwind CSS v4 + React Aria). Use when building UIs with HeroUI — creating Buttons, Modals, Forms, Cards; installing @heroui/react; configuring dark/light themes with oklch variables; or fetching component docs. Keywords: HeroUI, Hero UI, heroui, @heroui/react, @heroui/styles.
repo: heroui-inc/heroui
लोकप्रियता
- GitHub स्टार
- 31k
- रैंकिंग में स्थान
- #9327
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
heroui-migration
31kयह आपके एजेंट को HeroUI v2 वेब ऐप को HeroUI v3 पर ले जाने में मदद करती है, जिसमें बदले हुए कॉम्पोनेंट पैटर्न और हटाए गए हुक शामिल हैं।
heroui-native
31kयह आपके एजेंट को HeroUI Native कॉम्पोनेंट, जैसे बटन, कार्ड और डायलॉग, से मोबाइल ऐप स्क्रीन बनाने में मदद करती है।
मिलती-जुलती skills
angular-developer
280kआपके एजेंट को Angular code बनाने और प्रोजेक्ट स्ट्रक्चर पर सलाह देने में मदद करता है। नए प्रोजेक्ट शुरू करने, code के हिस्से बनाने, या performance और accessibility सुधारने में उपयोगी है।
frontend-a11y
280kआपके एजेंट को web interfaces को सबके लिए accessible बनाने में मदद करता है। यह सुनिश्चित करता है कि websites और apps screen readers और keyboard navigation के साथ अच्छे से काम करें।
frontend-patterns
280kआपके एजेंट को React और Next.js में frontend development के modern patterns लागू करने में मदद करता है। यह performance optimize करता है, state manage करता है और best practices फॉलो करवाता है।