D·Camp UI

Action

Label

상태, 카테고리, 태그 등을 표현하는 소형 인라인 라벨 컴포넌트입니다. 7가지 색상, pill/사각 모양, 채움/아웃라인/고스트 스타일, 아이콘 전용 뱃지 모드를 지원합니다.

import { Label } from "@/shared/ui/common/action"

인터랙티브 데모

Label
Color
tsx
<Label
  fill
  leftIcon={Dot}
  rightIcon={X}
>
  Label
</Label>

Style Variants

fill · outline 조합으로 4가지 스타일을 만들 수 있습니다.

투자
투자
투자

Color × Style

7가지 색상과 스타일 변형의 전체 조합입니다.

ColorFillFill+OutlineOutlineGhostIcon Only
GreenLabelLabelLabelLabel
BlueLabelLabelLabelLabel
SkyBlueLabelLabelLabelLabel
PurpleLabelLabelLabelLabel
YellowLabelLabelLabelLabel
RedLabelLabelLabelLabel
GreyLabelLabelLabelLabel

Icon Layouts

leftIcon · rightIcon · iconOnly 조합입니다.

Label
Label
Label

Round vs Square

round prop으로 pill 형태와 사각형 형태를 전환합니다.

RoundSquare
Green
RoundSquare
Blue
RoundSquare
SkyBlue
RoundSquare
Purple
RoundSquare
Yellow
RoundSquare
Red
RoundSquare
Grey

Props

Label

PropTypeRequiredDefault설명
color"green" | "blue" | "skyblue" | "purple" | "yellow" | "red" | "grey""green"색상 테마
roundbooleantruepill 형태(true) vs 사각(false)
fillbooleantrue배경색 채움 여부
outlinebooleanfalse테두리 표시 여부
iconOnlybooleanfalse아이콘 전용 뱃지 모드 (20×20)
leftIconComponentType<{ className?: string }>텍스트 앞 아이콘
rightIconComponentType<{ className?: string }>텍스트 뒤 아이콘
childrenReactNode레이블 텍스트
classNamestring추가 CSS 클래스