# HeroUI v3 — AI Integration Prompt Packs System prompts that teach AI code-generation tools to produce correct, idiomatic HeroUI v3 code. ## What's in this directory | File | Purpose | |------|---------| | `heroui-system-prompt.md` | Universal prompt — works with any LLM or AI coding tool (Claude, ChatGPT, Cursor, Copilot, etc.) | | `v0-heroui.md` | Tailored for [v0.dev](https://v0.dev) — emphasizes Next.js App Router, RSC patterns, and Tailwind v4 | | `bolt-heroui.md` | Tailored for [bolt.new](https://bolt.new) / StackBlitz — includes full Vite setup and runnable single-file examples | These prompts also work well with **Lovable**, **Replit Agent**, **Windsurf**, and similar AI-powered code generation platforms. ## How to use ### v0.dev Paste the contents of `v0-heroui.md` into v0's system instructions or prepend it to your prompt. ### bolt.new / StackBlitz Paste the contents of `bolt-heroui.md` at the start of your prompt when creating a new project. It includes the full Vite + Tailwind v4 setup so bolt can scaffold the project correctly. ### Cursor / Claude / ChatGPT / Copilot Use `heroui-system-prompt.md` as a custom instruction, system prompt, or `.cursorrules` file. It gives the AI a focused reference of common HeroUI v3 components, validated forms, controlled selection, and theme-aware styling. Each prompt links to the full component index and current API documentation for additional components. ### Any other tool The universal `heroui-system-prompt.md` works with any tool that accepts system-level instructions. ## Richer integrations For deeper integration beyond system prompts: - **MCP Server** — The HeroUI MCP server provides real-time component docs, source code, and theme tokens to AI agents. See the [`@heroui/react-mcp`](https://www.npmjs.com/package/@heroui/react-mcp) package. - **React documentation index** — [heroui.com/react/llms.txt](https://heroui.com/react/llms.txt). - **Full React documentation** — [heroui.com/react/llms-full.txt](https://heroui.com/react/llms-full.txt). The root [llms.txt](https://heroui.com/llms.txt) is a cross-platform index covering React and Native. - **Component index** — [All React components](https://heroui.com/docs/react/components), including components omitted from these focused prompts. ## Contributing When updating these prompts, verify that the component names, APIs, and import patterns match the actual v3 source code in this repo. Run a quick check against the component docs in `apps/docs/content/docs/en/react/components/` to catch any drift. These prompt packs require React and React DOM **19+** and Tailwind CSS **v4**. Existing projects should retain compatible dependencies; examples are not an instruction to upgrade the app or switch package managers. Keep shared guidance synchronized across all three prompts. When validating an update: - Check public exports and peer dependencies in `packages/react/package.json` and published subpaths generated by `packages/react/scripts/update-exports.mjs`. - Check component props and composition against `packages/react/src/components/`, and variants against `packages/styles/src/components/`. - Type-check JSX examples and complete examples against the matching HeroUI version. A type check does not catch invalid nested buttons, missing accessible names, or client/server boundary errors; review those separately. - Verify the framework's CSS integration and smoke-build the complete Vite example when setup changes. - Retrieve current component docs through `@heroui/react-mcp` or the React documentation links when an API is not covered here. Repository contributors can also use the source and demos in `apps/docs/src/demos/en/`.