stack-analysis
CHAPTER 10 / 90
읽기 약 2분
FUNCTION
스타일링 비교: Tailwind vs CSS Modules vs styled
핵심 개념
3가지 접근법 비교·성능·팀 규모별 추천 — 같은 카드 컴포넌트 3가지.
본문
비교 표
| 측면 | Tailwind | CSS Modules | styled-components |
|---|---|---|---|
| 학습 곡선 | ⭐⭐ | ⭐ | ⭐⭐⭐ |
| 번들 크기 | 작음 (purge) | 중 | 중 |
| 런타임 비용 | 0 | 0 | 있음 |
| 동적 스타일 | ⭐⭐ | ⭐ | ⭐⭐⭐ |
| 디자인 시스템 | ⭐⭐⭐ | ⭐⭐ | ⭐⭐ |
| 적합 | 중대규모·디자인 시스템 | 단순 + CSS 친숙 | JS 친숙 + 동적 |Tailwind
function ProductCard({ product, isFeatured }: Props) {
return (
<div className={`
p-4 rounded-lg shadow-md transition
${isFeatured ? 'bg-amber-50 border-2 border-amber-500' : 'bg-white border'}
hover:shadow-xl hover:scale-105
`}>
<h3 className="text-xl font-bold text-gray-900">{product.name}</h3>
<p className="text-gray-600 mt-2">{product.description}</p>
<div className="flex justify-between items-center mt-4">
<span className="text-2xl font-bold text-indigo-600">
₩{product.price.toLocaleString()}
</span>
<button className="px-4 py-2 bg-indigo-600 text-white rounded hover:bg-indigo-700">
담기
</button>
</div>
</div>
);
}CSS Modules
/* ProductCard.module.css */
.card {
padding: 1rem;
border-radius: 0.5rem;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
transition: all 0.2s;
}
.card:hover {
transform: scale(1.05);
box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.featured {
background: #fef3c7;
border: 2px solid #f59e0b;
}
.title {
font-size: 1.25rem;
font-weight: bold;
color: #111827;
}
.price {
font-size: 1.5rem;
font-weight: bold;
color: #4f46e5;
}import styles from './ProductCard.module.css';
function ProductCard({ product, isFeatured }: Props) {
return (
<div className={`${styles.card} ${isFeatured ? styles.featured : ''}`}>
<h3 className={styles.title}>{product.name}</h3>
<span className={styles.price}>₩{product.price.toLocaleString()}</span>
</div>
);
}styled-components
import styled from 'styled-components';
const Card = styled.div<{ isFeatured?: boolean }>`
padding: 1rem;
border-radius: 0.5rem;
box-shadow: 0 4px 6px rgba(0,0,0,0.1);
transition: all 0.2s;
background: ${p => p.isFeatured ? '#fef3c7' : '#fff'};
border: ${p => p.isFeatured ? '2px solid #f59e0b' : '1px solid #e5e7eb'};
&:hover {
transform: scale(1.05);
box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
`;
const Title = styled.h3`
font-size: 1.25rem;
font-weight: bold;
color: #111827;
`;
const Price = styled.span`
font-size: 1.5rem;
font-weight: bold;
color: #4f46e5;
`;
function ProductCard({ product, isFeatured }: Props) {
return (
<Card isFeatured={isFeatured}>
<Title>{product.name}</Title>
<Price>₩{product.price.toLocaleString()}</Price>
</Card>
);
}한국 시장 트렌드
2026년 한국 프론트 트렌드:
1. Tailwind: 60% (압도적, 빠른 개발)
2. CSS Modules: 25% (Next.js 친화)
3. styled-components: 10% (감소 중 — Server Components 비호환)
4. Emotion / Vanilla Extract: 5% (특수 용도)
빅테크 채택:
- 토스: Tailwind + 자체 디자인 시스템
- 쿠팡: Tailwind
- 당근: Tailwind + CSS Modules
- 네이버: 자체 시스템 (구) + Tailwind (신규)다음 챕터
CH.11 "테스트: Testing Library + Vitest" — 컴포넌트 테스트.
AI 프롬프트
🤖 AI에게 잘 물어보는 법 — 모델·전략별 프롬프트
Claude
무료: Sonnet 4.6 / Pro $20/mo: Opus 4.6
내 코드의 스타일링 부분을 분석해서 실전 분석 + 개선 우선순위를 알려줘.
ChatGPT
무료: GPT-5.5 / Plus $20/mo: GPT-5.5 Pro
스타일링 관련 인기 라이브러리/패턴 5개를 비교 분석해서 패턴 추출를 알려줘.
Gemini
무료: 2.5 Flash / Pro $19.99/mo: 3.1 Pro
내 프로젝트 전체에서 스타일링 최적화 가능 위치를 보고해줘.
Grok
무료: Grok 4.1 / SuperGrok $30/mo
2026년 한국 프론트엔드 시장의 스타일링 트렌드를 솔직히 알려줘.
⭐ 이것만 기억하세요
스타일링 비교: Tailwind vs CSS Modules vs styled는 이 3가지만 확실히 잡으세요
1.Tailwind는 한국 시장 표준 — 빠른 개발 + 작은 번들 + 디자인 시스템 친화
2.styled-components는 Server Components와 부조화 — Tailwind 또는 CSS Modules로 마이그레이션
3.다음 챕터 CH.11에서 테스트 — 접근성 기반 쿼리
공유하기
진행도 10 / 90