Quick Start
몇 분 안에 HeroUI v3를 시작할 수 있도록 필요한 요구사항과 설치·스타일 임포트·컴포넌트 사용 방법을 안내하는 문서입니다. MCP 서버를 활용한 AI 어시스턴트 자동 설정 방법도 함께 소개해요.
본문
요구사항 (Requirements)
빠른 설치 (Quick Install)
<CopyPrompt prompt={`Set up HeroUI in this React project.
Use the HeroUI MCP server (@heroui/react-mcp) as the single source of truth for installation steps, peer dependencies, and component APIs. Start by retrieving the latest quick-start / installation guide from the MCP and follow it precisely — do not rely on memory for versions, package names, or setup steps.
Before making any changes:
- Analyze the project. Detect the package manager (npm / pnpm / yarn / bun), framework (e.g. Next.js, Vite, Remix, Astro, etc.), TypeScript usage, and the location of the main CSS entry file (e.g. globals.css, app.css, index.css).
- Confirm the project meets the requirements: React 19+ and Tailwind CSS v4. If Tailwind CSS v4 is not installed, set it up following the official Tailwind v4 framework guide that matches the detected framework before adding HeroUI.
- Read package.json and only install what is missing. Pin to the exact versions listed in the MCP quick-start to avoid compatibility issues.
Then apply the setup:
- Install @heroui/react and @heroui/styles plus any missing mandatory peer dependencies.
- In the main Tailwind CSS entry file, add `@import "@heroui/styles";` immediately after `@import "tailwindcss";`. Import order matters — tailwindcss must be imported first.
- Make sure the CSS entry file is loaded by the app (e.g. imported in the root layout / entry file for Next.js, Vite, Remix, etc.). HeroUI v3 does not require a Provider, so no wrapper component is needed.
- Add a small smoke test by rendering a `` from `@heroui/react` somewhere visible to confirm styles are applied.
When done, summarize the changes you made and tell me how to start the dev server.`}
AI 어시스턴트에게 맡기는 쪽을 선호하세요? 에디터에 HeroUI MCP Server를 설치한 다음 위 프롬프트를 AI 어시스턴트에 붙여넣으세요 — 프로젝트를 분석하고 설정 전체를 처리해줄 거예요.
HeroUI와 필요한 의존성을 설치하세요:
<Tabs items={["npm", "pnpm", "yarn", "bun"]}>
bash npm i @heroui/styles @heroui/react
bash pnpm add @heroui/styles @heroui/react
bash yarn add @heroui/styles @heroui/react
bash bun add @heroui/styles @heroui/react
스타일 임포트 (Import Styles)
메인 CSS 파일 globals.css에 추가하세요:
@import "tailwindcss";
@import "@heroui/styles"; /* [!code highlight]*/
Import 순서가 중요해요. 항상 `tailwindcss`를 먼저 임포트하세요.
컴포넌트 사용 (Use Components)
import { Button } from '@heroui/react';
function App() {
return (
<Button>
My Button
</Button>
);
}
다음은 무엇인가요? (What's Next?)
- 테마 (Themes) - 나만의 테마를 만들고 공유하기
- 컴포넌트 둘러보기 (Browse Components) - 사용 가능한 모든 컴포넌트 보기
- 스타일링 배우기 (Learn Styling) - Tailwind CSS로 커스터마이즈
- 패턴 탐색 (Explore Patterns) - 복합 컴포넌트 마스터하기