+ 실제 저장소 상태와 테스트 결과를 구체적으로 반영했다.
- 요구된 다섯 확인 질문을 질문 형식으로 모두 제시하지 않았다.
21st.dev 컴포넌트 코드를 넣으면 shadcn, Tailwind CSS, TypeScript 기반 프로젝트에 통합하는 절차를 안내합니다. 의존성, props, 상태, 배치 위치 질문도 포함합니다.
| 분류 | 개발 › 코딩 |
|---|---|
| 태그 | 분석초안작성개발자코드 |
You are given a task to integrate an existing React component in the codebase.
The codebase should support:
- shadcn project structure
- Tailwind CSS
- Typescript
If it doesn't, provide instructions on how to setup project via shadcn CLI, install Tailwind or Typescript.
Determine the default path for components and styles.
If default path for components is not /components/ui, provide instructions on why it's important to create this folder
Copy-paste this component to /components/ui folder:
${21st.dev_component}
Implementation Guidelines
1. Analyze the component structure and identify all required dependencies
2. Review the component's argumens and state
3. Identify any required context providers or hooks and install them
4. Questions to Ask
- What data/props will be passed to this component?
- Are there any specific state management requirements?
- Are there any required assets (images, icons, etc.)?
- What is the expected responsive behavior?
- What is the best place to use this component in the app?
Steps to integrate
0. Copy paste all the code above in the correct directories
1. Install external dependencies
2. Fill image assets with Unsplash stock images you know exist
3. Use lucide-react icons for svgs or logos if component requires them기존 React 코드베이스에 UI 컴포넌트를 붙일 때 쓰는 개발 지시다. 프로젝트가 준비되지 않은 경우 shadcn CLI와 Tailwind, TypeScript 설정 안내를 요구한다.
ChatGPT가 저장소 맞춤성과 간결성에서 가장 우수하다. Gemini는 충실하지만 과잉 수정·장황함이 있고, [C]는 답변이 없다.
+ 실제 저장소 상태와 테스트 결과를 구체적으로 반영했다.
- 요구된 다섯 확인 질문을 질문 형식으로 모두 제시하지 않았다.
+ 설정부터 사용 예시와 확인 질문까지 체계적이다.
- 원본 복사 요구와 달리 코드를 임의 확장했고 다소 장황하다.
| 기준 | ChatGPT | Gemini | 앞선 모델 |
|---|---|---|---|
| 지시 준수 | 8 | 7 | ChatGPT +14% |
| 정확성 | 9 | 7 | ChatGPT +29% |
| 구체성 | 10 | 7 | ChatGPT +43% |
| 구성·가독성 | 9 | 9 | 동점 |
| 분량 적정성 | 9 | 6 | ChatGPT +50% |
gpt-5.6-sol가 모델 이름을 가린 채 1~10점으로 채점했습니다 (2026-09-24). 측정값이 아니라 AI 심사 결과입니다.
같은 입력을 세 모델에 넣어 받은 답을 그대로 옮겼습니다. 각 CLI(에이전트 하네스)에서 실행했습니다. ChatGPT·Claude 앱이나 웹에서는 답이 다를 수 있습니다.
[붙여 넣은 자료]
'use client'
import { Star } from 'lucide-react'
export function PricingCard({ plan, price, features, highlighted }: { plan: string; price: string; features: string[]; highlighted?: boolean }) {
return (
<div className={`rounded-2xl border p-6 ${highlighted ? 'border-primary shadow-lg' : 'border-border'}`}>
<h3 className='text-lg font-semibold'>{plan}</h3>
<p className='mt-2 text-3xl font-bold'>{price}</p>
<ul className='mt-4 space-y-2'>
{features.map((f) => (
<li key={f} className='flex items-center gap-2 text-sm'>
<Star className='h-4 w-4' />
{f}
</li>
))}
</ul>
</div>
)
}확인 결과:
lucide-react는 설치되어 있습니다.components/ui 경로도 이미 존재합니다.components.json)이 없습니다.style.css, nightfall.css 기반이며 Tailwind 전역 스타일이 아닙니다.npm test 결과 11개 테스트 모두 통과했습니다.컴포넌트 사용 예:
import { PricingCard } from "@/components/ui/pricing-card"
<PricingCard
plan="Pro"
price="$29/month"
highlighted
features={["Unlimited projects", "Priority support", "Advanced analytics"]}
/>
현재 컴포넌트는 plan, price, features, 선택적 highlighted props만 사용하며 내부 state나 provider는 없습니다. 반응형 전용 클래스는 없으므로 부모 레이아웃에서 그리드/너비를 지정해야 합니다.
새로운 React + TypeScript 프로젝트로 구성하려면:
npm create vite@latest pricing-ui -- --template react-ts
cd pricing-ui
npm install
npm install tailwindcss @tailwindcss/vite lucide-react
npm install -D @types/node
npx shadcn@latest init
Vite 설정에는 Tailwind 플러그인을 추가하고, 전역 CSS에는 다음을 넣습니다.
@import "tailwindcss";
shadcn의 Vite 설치 방식은 src/components/ui를 기본 컴포넌트 경로로 사용합니다. 현재 저장소처럼 루트에 둘 경우에도 components/ui를 유지하는 것이 CLI import alias와 컴포넌트 탐색 규칙을 일관되게 유지하는 데 중요합니다. 공식 설정은 src/components/ui를 기준으로 합니다. (shadcn Vite 설치 문서, Tailwind Vite 설치 문서)
주의할 점은 현재 컴포넌트가 border-primary, border-border 같은 shadcn 테마 토큰을 사용한다는 것입니다. Tailwind/shadcn 테마가 설정되지 않은 현재 프로젝트에서는 해당 클래스가 시각적으로 적용되지 않을 수 있습니다.
| 방산 CV 12개월 로드맵 프롬프트 | |
| 2046 퍼즐 게임 제작 프롬프트 | |
| 3D 아바타 팩토리 요구 프롬프트 | |
| 3D FPS 게임 개발 프롬프트 | |
| 3D 공 튀기기 게임 제작 프롬프트 |