reopt design
DocsExploreTemplatesCanvasToolsPricing
Login
opt-uiopt-chartsopt-datagridopt-editoropt-calendaropt-filemanageropt-chatopt-shellbrandapp-ui
Overview205Core74Shells99Blocks32
StatCard
reopt designreopt design

A design system for the AI era

  • Docs
  • Pricing
  • Releases
  • About
  • Contact
  • Terms of Service
  • Privacy Policy

reopt Inc.Business registration no. 217-88-02453contact@reopt.ai

© 2026 reopt Inc. All rights reserved.

StatCard

Component

Show a metric with its value, change, and supporting description. Omit the change row when no comparison is available.

indicator
Related docs
bun add @reopt-ai/opt-ui
Install and import
bash
bun add @reopt-ai/opt-ui
tsx
import { StatCard } from "@reopt-ai/opt-ui";

Live preview

Change the width and theme, then interact with the components.

100%

Metrics with meaning and selection state

Selected metric: revenue

Loading and density

Query latency184ms↓ -12ms

StatCard

PropTypeDefaultDescription
titleRequiredstring—통계 제목
valueRequiredstring—통계 값
changestring—변화량 텍스트 (예: '+12.5%'). 비교 기준이 없으면 생략 — trend와 함께 있을 때만 렌더된다
trend"up" | "down" | "neutral"—변화 방향. change와 함께 있을 때만 의미를 갖는다
polarity"positive" | "negative""positive"상승이 좋은 지표인지. 이탈률·에러 수처럼 반대인 지표는 negative로 색을 뒤집는다
descriptionstring—값 아래 한 줄 보조 설명 (집계 대상·기간 등)
hintstring—산출 근거 등 긴 설명. 툴팁과 aria-describedby로 노출
size"sm" | "md""md"밀도 프리셋. 요약 행에는 sm
loadingbooleanfalse값 로딩 중 스켈레톤 표시
hrefstring—드릴다운 링크. 지정 시 카드가 앵커로 렌더된다
onSelect() => void—드릴다운 핸들러. 지정 시 카드가 버튼으로 렌더된다
selectedbooleanfalse선택 가능한 카드 행에서 현재 선택 상태
sparklineDatanumber[]—값 옆에 그릴 미니 추세선 데이터

컴포넌트 의존 관계

깊이
▲ USED BY (3)dashboard-gridinsights-panelsummary-rowStatCard
View test results

테스트 커버리지

2026년 7월 9일3/3 통과
3성공
0실패
3전체
  • title, value, change를 렌더링한다
  • 상승 트렌드에 상승 아이콘을 표시한다
  • 하락 트렌드에 하락 아이콘을 표시한다

Related components

opt-ui

Kbd

Core

Display keyboard shortcuts as inline key badges.

opt-ui

CompositeZone

Core

Navigate child elements in two dimensions with arrow keys using a Composite container.

opt-ui

Toolbar

Core

Group actions in a toolbar with buttons, separators, and tooltips.

opt-ui

Badge

Core

Display inline status badges with five color variants and an optional status dot.

opt-ui

Spinner

Core

Indicate loading in three sizes, with an aria-hidden mode for decorative use.

opt-ui

Skeleton

Core

Reserve space while loading with text, circular, rectangular, and preset skeleton components.

PreviousAccordionNextCompositeZone