D·Camp UI

Action

Tooltip

Dark Mode

두 가지 성격의 툴팁을 제공합니다. DataTooltip은 그래프·표 호버 시 상세 데이터를 보여주는 UI이고, TooltipBubble은 도움말·팁 안내에 사용되는 말풍선 형태 툴팁입니다.

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

DataTooltip

그래프 · 표 호버

인터랙티브 데모

디캠프 펀드
수익률
1개월+3.2%
3개월+8.7%
6개월+12.5%
Mode
Sections
Options
tsx
<DataTooltip
  title="디캠프 펀드"
  dotColor="bg-primary"
  sections={SECTIONS_1}
/>

Variants

섹션 수, Dot 유무, Single 모드에 따른 변형입니다.

디캠프 펀드
수익률
1개월+3.2%
3개월+8.7%
6개월+12.5%
수익률
수익률:+12.5%

TooltipBubble

도움말 · 말풍선

인터랙티브 데모

메시지에 마침표를 찍어요.
Arrow Side
Arrow Align
Color
Options
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

PropTypeRequiredDefault설명
titlestring툴팁 제목
dotColorstring제목 좌측 Dot 색상 (Tailwind bg 클래스, 예: bg-primary)
sectionsTooltipSection[]데이터 섹션 목록
singlebooleanfalse단일 인라인 값 표시 모드 ("Title: value" 형태)
classNamestring추가 CSS 클래스

TooltipSection

PropTypeRequiredDefault설명
titlestring섹션 소제목
rowsTooltipValueRow[]Name–Value 행 목록

TooltipValueRow

PropTypeRequiredDefault설명
namestring항목 이름 (좌측)
valuestring항목 값 (우측)

TooltipBubbleProps

PropTypeRequiredDefault설명
childrenReactNode말풍선 내용
arrowSide"top" | "bottom" | "left" | "right""top"화살표 방향 (어느 쪽에 화살표가 붙는지)
arrowAlign"start" | "center" | "end""start"화살표 정렬 위치
color"primary" | "info""primary"배경 색상 (primary: 오렌지, info: 블루)
showArrowbooleantrue화살표 노출 여부
actionLabelstring"더 알아보기"보조 액션 버튼 텍스트
onAction() => void보조 액션 클릭 핸들러 — 전달 시 액션 버튼 노출
onClose() => void닫기 버튼 클릭 핸들러 — 전달 시 닫기 버튼 노출
classNamestring추가 CSS 클래스