LiftDesign System
Beta
한국어 Get started
  1. Components
  2. Product
  3. BarChart

Components / Product

BarChart — Implementation

Compare values by category

Context
Product
Content
source-derived
Availability
implemented
Verification
static-only 2026-11-18
Source revision
Lift 1.2.3 6f50499aa095…
Source language
KO · not translated

Supported environment

The Lift 1.2.3 reference implementation is a React 18 function component with inline styles referencing Product tokens (hsl(var(--*))), so styles.product.css must be loaded. The mapping to an npm package could not be verified in this repository.

API

Copied from BarChartProps in components/_types.d.ts.

proptypedefaultdoc
dataBarDatum[]—
orientation"vertical" | "horizontal"—
palette"brand" | "categorical"—기본 "brand" — 브랜드 스케일 한 계열(--chart-brand-1…5). 계열이 다른 항목만 "categorical".
heightnumber—
maxnumber—
unitstring—
titlestring—
valueFormat(value: number) => string—
showValuesboolean—
styleReact.CSSProperties—

BarDatum

fieldtypedefaultdoc
label requiredstring—
value requirednumber—
colorstring—

Code

One import line plus the example code from the usage note.

jsx · import
import { BarChart } from "./components/data/BarChart.jsx";
jsx · BarChart.prompt.md
<BarChart title="모델별 정확도" unit="%" data={[{label:"solar-pro3",value:92.4},{label:"solar-pro2",value:88.1}]} />
<BarChart orientation="horizontal" title="문서 유형 분포" palette="categorical" data={rows} />
tsx · BarChart.prompt.md
// ✗ Recharts 기본 툴팁. 항목 글자가 계열 색(라임)이다
<Tooltip />
// ✓ 항목과 제목 글자를 중립 토큰으로 덮는다. 앱 공통 프리셋 하나로 모든 차트에 적용한다
<Tooltip itemStyle={{ color: "hsl(var(--popover-foreground))" }} labelStyle={{ color: "hsl(var(--popover-foreground))" }} />

Token bindings

Tokens the implementation references with var(). Names assembled at runtime (e.g. --state-${tone}-fg) are not listed.

--border, --chart-, --chart-brand-, --duration-normal, --ease-decelerate, --font-sans, --foreground, --muted, --muted-foreground

Source