# Upstage Design System — Tooltip (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/tooltip/ · machine doc: /agent/components/product/tooltip.md
## Required references (read these)
- /components/display/Tooltip.jsx — implementation · sha256 85b78e74e0fb…
- /components/_types.d.ts — api · key TooltipProps
- /components/display/Tooltip.prompt.md — usage-note · sha256 e6d07440ae2e…
- /kit/rules/a11y-contract.json — a11y · key Tooltip
## API (components/_types.d.ts TooltipProps)
- content?: React.ReactNode
- side?: "top" | "bottom" | "left" | "right" (default top)
- children?: React.ReactNode
- style?: React.CSSProperties
## Accessibility contract
- keys: Escape
- aria: role=tooltip, aria-describedby
- notes: 포커스로도 열린다. 필수 정보를 툴팁에만 두지 않는다
## Unverified
- Browser behaviour is not verified here (static source check only).
사용 지침
components/display/Tooltip.prompt.md원문 · KO·EN · 번역하지 않았다
Hover tooltip (neutral-900 bubble, 12px text).
색 토큰 (Studio 사례, 2026-10-22)
툴팁은 중립 토큰으로 칠한다. @upstageai/ui Tooltip은 기본 배경이 bg-primary(보라)라서 그대로 쓰면 보라 툴팁이 나온다. Studio 시안의 툴팁 3곳(시작 시각, 막힌 Run 이유, 신뢰도 낮음 표시)이 이렇게 나왔다.
| 부위 | 토큰 | 라이트 | 다크 |
|---|---|---|---|
| 바탕 | hsl(var(--tooltip)) |
neutral-900 | neutral-100 |
| 글자 | hsl(var(--tooltip-foreground)) |
neutral-0 | neutral-900 |
| 그림자 | var(--shadow-tooltip) |
같음 | 같음 |
| 겹침 순서 | var(--z-popover) |
같음 | 같음 |
// ✗ 기본값 그대로 쓴다. 바탕이 bg-primary(보라)다
<TooltipContent>Copy to clipboard</TooltipContent>
// ✓ 중립 토큰으로 덮는다
<TooltipContent className="bg-[hsl(var(--tooltip))] text-[hsl(var(--tooltip-foreground))]">Copy to clipboard</TooltipContent>
HSL 숫자 토큰은 hsl(var(--x))로 감싼다
Lift와 @upstageai/ui의 색 토큰은 완성된 색이 아니라 240 6% 10% 같은 HSL 숫자 세 개다. var(--tooltip)을 그대로 색 자리에 넣으면 선언이 무효가 되고 바탕이 투명하게 나온다. Studio에서 툴팁 색을 처음 바꿨을 때 이렇게 나왔다.
| ✗ | ✓ |
|---|---|
background: var(--tooltip) |
background: hsl(var(--tooltip)) |
bg-[var(--tooltip)] |
bg-[hsl(var(--tooltip))] |
rgba(var(--tooltip), .9) |
hsl(var(--tooltip) / 0.9) |
감싸야 하는 토큰(tokens/primitives.css, tokens/tokens.product.css 기준):
| 묶음 | 토큰 |
|---|---|
| primitive | --color-* 전부 |
| 표면, 글자 | --background --foreground --card --card-foreground --popover --popover-foreground --popover-border --muted --muted-foreground --border --border-subtle |
| 컴포넌트 | --tooltip --tooltip-foreground --badge-default --badge-default-foreground --code-background --code-foreground --modal-bg |
| 상태 | --state-*-bg --state-*-icon --state-*-fg. 다크의 --state-*-bg는 primitive를 참조하지 않고 HSL 숫자를 직접 적었다(tokens.product.css .dark 블록, 예: 163 88% 10%). 형식이 같으므로 똑같이 감싼다. |
| 차트 | --chart-* --chart-brand-* |
| 그림자 재료 | --shadow-color --overlay |
감싸지 않는 토큰: --shadow-*(완성된 box-shadow 값), --radius --radius-lg, --space-*, --z-*, --duration-*.
형식이 다른 토큰: --dimed는 알파까지 들어 있다(222 47% 11% / 0.9). hsl(var(--dimed))로만 쓰고 뒤에 알파를 덧붙이지 않는다. --gradient-*는 쉼표 형식이고 배경 전용이다.
비활성 트리거
막힌(disabled) 버튼은 포인터 이벤트를 받지 않아 툴팁이 뜨지 않는다. 비활성 이유를 툴팁으로 보여 줄 때는 버튼을 감싼 요소가 툴팁을 띄운다. 터치 화면에서는 툴팁이 뜨지 않는다. 비활성 이유가 꼭 필요하면 툴팁에만 두지 않는다.
적용 규칙
이 컴포넌트를 이름으로 지목한 규칙은 없다. Product 공통 규칙을 따른다. DESIGN.product.md §7
출처
components/display/Tooltip.jsximplementation · sha256 85b78e74e0fb…components/_types.d.tsapi · TooltipPropscomponents/display/Tooltip.prompt.mdusage-note · sha256 e6d07440ae2e…kit/rules/a11y-contract.jsona11y · Tooltip