컴포넌트로 돌아가기
여러 아이콘 라이브러리(Phosphor, Lucide, Iconsax)를 지원하는 통합 아이콘 컴포넌트입니다.
설치
Import
@hua-labs/ui의 UI 컴포넌트를 @hua-labs/hua에서 통합 제공합니다.
UI 컴포넌트, 모션 훅, i18n을 하나의 패키지로 사용할 수 있습니다.
라이브 데모
기본 사용법
다양한 아이콘을 표시합니다.
크기
size={16, 20, 24, 32, 48}
16
20
24
32
48
Phosphor Weight
6가지 weight 지원: thin, light, regular, bold, duotone, fill
thin
light
regular
bold
duotone
fill
색상 변형
default
primary
secondary
success
warning
error
muted
애니메이션
spin
pulse
bounce
프로바이더 비교
같은 아이콘을 다른 라이브러리로 표시
Phosphor
6가지 weight 지원
Lucide
strokeWidth 지원
Iconsax
다양한 스타일
케이스 정규화
kebab-case, camelCase, PascalCase 모두 지원됩니다.
Lucide
heart
Heart
arrow-left
arrowLeft
Phosphor
heart
Heart
arrow-left
Iconsax
heart
Heart
HEART
Props
| 이름 | 타입 | 기본값 | 설명 |
|---|---|---|---|
name* | AllIconName | - | 아이콘 이름 |
size | number | string | 20 | 아이콘 크기 (px) |
provider | "lucide" | "phosphor" | "iconsax" | "phosphor" | Icon provider to use (overrides global setting) |
weight | "thin" | "light" | "regular" | "bold" | "duotone" | "fill" | "regular" | Phosphor 아이콘 weight |
variant | "default" | "primary" | "secondary" | "success" | "warning" | "error" | "muted" | "default" | 색상 변형 |
spin | boolean | false | 회전 애니메이션 |
pulse | boolean | false | 펄스 애니메이션 |
bounce | boolean | false | 바운스 애니메이션 |
animated | boolean | false | Enable animation (general) |
emotion | "happy" | "sad" | "neutral" | "excited" | "angry" | "love" | "like" | "dislike" | - | Emotion icon type (happy, sad, angry, etc.) |
status | "success" | "error" | "warning" | "info" | "loading" | "locked" | "unlocked" | "visible" | "hidden" | - | Status icon type (loading, success, error, etc.) |
aria-label | string | - | Accessible label for meaningful icons |
aria-hidden | boolean | true | Hide from screen readers (decorative icons) |
IconProvider
Props
| 이름 | 타입 | 기본값 | 설명 |
|---|---|---|---|
set | "lucide" | "phosphor" | "iconsax" | "phosphor" | Default icon set for all child icons |
weight | "thin" | "light" | "regular" | "bold" | "duotone" | "fill" | "regular" | Phosphor 아이콘 weight |
size | number | 20 | 아이콘 크기 (px) |
color | string | "currentColor" | Default icon color |
strokeWidth | number | 1.25 | Default stroke width (Lucide/Iconsax) |
iconsaxVariant | "line" | "bold" | "line" | Iconsax 아이콘 변형 스타일 |
코드 예시
기본 사용법
크기 조절
IconProvider 사용
Phosphor Weight 변형
색상 변형
애니메이션
특수 아이콘
접근성
프로바이더 비교
| 기능 | Phosphor | Lucide | Iconsax |
|---|---|---|---|
| 아이콘 수 | 6,000+ | 1,400+ | 1,000+ |
| Weight/Style | 6 weights | strokeWidth | Linear/Bold |
| 기본값 | ✅ | - | - |
| 특징 | 듀오톤 스타일 지원 | 일관된 디자인 | 모던 스타일 |
접근성
- •장식적 아이콘: 의미 없는 아이콘은 기본적으로 aria-hidden='true' 처리
- •의미 있는 아이콘: 정보를 전달하는 아이콘에는 aria-label 제공
- •버튼 아이콘: 아이콘만 있는 버튼은 aria-label로 접근 가능한 레이블 필요
- •색상 대비: 아이콘 색상은 배경과 충분한 대비를 유지해야 함