Action
Tooltip
Dark Mode두 가지 성격의 툴팁을 제공합니다. DataTooltip은 그래프·표 호버 시 상세 데이터를 보여주는 UI이고, TooltipBubble은 도움말·팁 안내에 사용되는 말풍선 형태 툴팁입니다.
import { Tooltip } from "@/shared/ui/common/action"DataTooltip
그래프 · 표 호버인터랙티브 데모
디캠프 펀드
수익률
1개월+3.2%
3개월+8.7%
6개월+12.5%
tsx
<DataTooltip
title="디캠프 펀드"
dotColor="bg-primary"
sections={SECTIONS_1}
/>Variants
섹션 수, Dot 유무, Single 모드에 따른 변형입니다.
디캠프 펀드
수익률
1개월+3.2%
3개월+8.7%
6개월+12.5%
수익률
수익률:+12.5%
TooltipBubble
도움말 · 말풍선인터랙티브 데모
메시지에 마침표를 찍어요.
tsx
<TooltipBubble>
메시지에 마침표를 찍어요.
</TooltipBubble>Color Variants
Figma Extended 패턴 기준의 색상과 옵션 조합입니다.
마침표를 찍어요.
마침표를 찍어요.
메시지에 마침표를 찍어요.
팁을 닫을 수 있어요.
Arrow Positions
4방향 × 3정렬 = 12가지 화살표 위치를 지원합니다.
top-start
팁 메시지
top-center
팁 메시지
top-end
팁 메시지
bottom-start
팁 메시지
bottom-center
팁 메시지
bottom-end
팁 메시지
left-start
팁 메시지
left-center
팁 메시지
left-end
팁 메시지
right-start
팁 메시지
right-center
팁 메시지
right-end
팁 메시지
Props
DataTooltipProps
| Prop | Type | Required | Default | 설명 |
|---|---|---|---|---|
title | string | ✓ | — | 툴팁 제목 |
dotColor | string | — | — | 제목 좌측 Dot 색상 (Tailwind bg 클래스, 예: bg-primary) |
sections | TooltipSection[] | ✓ | — | 데이터 섹션 목록 |
single | boolean | — | false | 단일 인라인 값 표시 모드 ("Title: value" 형태) |
className | string | — | — | 추가 CSS 클래스 |
TooltipSection
| Prop | Type | Required | Default | 설명 |
|---|---|---|---|---|
title | string | — | — | 섹션 소제목 |
rows | TooltipValueRow[] | ✓ | — | Name–Value 행 목록 |
TooltipValueRow
| Prop | Type | Required | Default | 설명 |
|---|---|---|---|---|
name | string | ✓ | — | 항목 이름 (좌측) |
value | string | ✓ | — | 항목 값 (우측) |
TooltipBubbleProps
| Prop | Type | Required | Default | 설명 |
|---|---|---|---|---|
children | ReactNode | ✓ | — | 말풍선 내용 |
arrowSide | "top" | "bottom" | "left" | "right" | — | "top" | 화살표 방향 (어느 쪽에 화살표가 붙는지) |
arrowAlign | "start" | "center" | "end" | — | "start" | 화살표 정렬 위치 |
color | "primary" | "info" | — | "primary" | 배경 색상 (primary: 오렌지, info: 블루) |
showArrow | boolean | — | true | 화살표 노출 여부 |
actionLabel | string | — | "더 알아보기" | 보조 액션 버튼 텍스트 |
onAction | () => void | — | — | 보조 액션 클릭 핸들러 — 전달 시 액션 버튼 노출 |
onClose | () => void | — | — | 닫기 버튼 클릭 핸들러 — 전달 시 닫기 버튼 노출 |
className | string | — | — | 추가 CSS 클래스 |