# Upstage Design System — Badge (product)
- context: product · group: display
- source revision: lift-1.2.3 (Lift 1.2.3, zip sha256 8d5d9377c2b4…)
- status: content source-derived · availability implemented · verification static-only
- human docs: /ko/components/product/badge/ · machine doc: /agent/components/product/badge.md
## Required references (read these)
- /components/display/Badge.jsx — implementation · sha256 320b3c3d0c1c…
- /components/_types.d.ts — api · key BadgeProps
- /components/display/Badge.prompt.md — usage-note · sha256 cd4494c8c276…
## API (components/_types.d.ts BadgeProps)
- tone?: string (default gray) — Categorical: coral, skyblue, olive, purple, mint, magenta, teal, burgundy, green, gray, yellow — or state: success, warning, info, error
- variant?: "soft" | "solid" (default soft) — soft (tinted bg, default) or solid (neutral-900 badge tokens)
- children?: React.ReactNode
- style?: React.CSSProperties
## Unverified
- Browser behaviour is not verified here (static source check only).
지원 환경
Lift 1.2.3 의 참조 구현은 React 18 함수 컴포넌트다. 스타일은 인라인이고 색은 Product 토큰(hsl(var(--*)))을 참조하므로 styles.product.css 가 로드돼 있어야 한다. npm 패키지와의 대응은 이 저장소에서 확인하지 못했다.
API
components/_types.d.ts 의 BadgeProps 를 그대로 옮겼다.
| prop | type | default | doc |
|---|---|---|---|
tone | string | gray | Categorical: coral, skyblue, olive, purple, mint, magenta, teal, burgundy, green, gray, yellow — or state: success, warning, info, error |
variant | "soft" | "solid" | soft | soft (tinted bg, default) or solid (neutral-900 badge tokens) |
children | React.ReactNode | — | |
style | React.CSSProperties | — |
코드
가져오기 한 줄과 사용 지침 원문의 예시 코드다.
import { Badge } from "./components/display/Badge.jsx";<Badge>새 기능</Badge>
<Badge tone="success">Active</Badge>
<Badge tone="purple">Beta</Badge>
<Badge variant="solid">Default</Badge><span class="badge">새 기능</span>.badge {
display: inline-flex;
align-items: center;
gap: 5px;
min-height: 22px;
padding: 2px 8px;
border-radius: 4px;
font-family: var(--font-sans);
font-size: 12px;
font-weight: 600;
background: hsl(var(--accent-gray-bg));
color: hsl(var(--accent-gray-fg));
}토큰 연결
구현 파일이 var() 로 직접 참조하는 토큰. 조건에 따라 이름을 조립하는 토큰(예: --state-${tone}-fg)은 빠진다.
--accent-, --badge-default, --badge-default-foreground, --font-sans, --state-
출처
components/display/Badge.jsximplementation · sha256 320b3c3d0c1c…components/_types.d.tsapi · BadgePropscomponents/display/Badge.prompt.mdusage-note · sha256 cd4494c8c276…