사용법
변형
아이콘만 표시하는 버튼이에요. aria-label은 필수예요. variant로 시각적 계층을 맞춰요.
스타일 커스터마이징
IconButton는 className과 style prop으로 루트 스타일을 덮어쓸 수 있어요.
<IconButton className="rounded-full px-4" style={{ opacity: 0.9 }} />인터페이스
IconButtonProps
| 속성 | 타입 | 기본값 | 설명 |
|---|---|---|---|
| icon* | ReactNode | — | 표시 아이콘 |
| aria-label* | string | — | 접근성 레이블 |
| variant | ButtonVariant | ghost | 버튼 변형 |
IconButton 컴포넌트 Props 표
가져오기
import { IconButton } from "@/components/ui/IconButton";