Skip to content
satin

Bar chart

One metric over a period as bars, with a tooltip on the hovered one.

Covers

2,335+8.4%

Oct 26 – Nov 1, 2026

  • Sun
  • Mon
  • Tue
  • Wed
  • Thu
  • Fri
  • Sat

Installation

Terminal
npm i @uisatin/ui
Import
import { BarCard } from '@uisatin/ui/bar-chart'

About 50.2 kB of JavaScript, minified and gzipped, with what it imports (React aside). The stylesheet is one file for every component.

First time with Satin? Set it up once, styles and fonts included, with the installation guide.

API Reference

The BarCard component is a wrapper around the div element with a title, a range, an optional period Select and the bars. New data regrows the bars from the baseline; reducedMotion (or the reader's reduced-motion setting) swaps them at once.

PropTypeDefault
title
string
—
range
string
—
data
ChartDatum[]
—
total
string
—
change
string
—
periods
string[]string[][]
—
value
string
—
onPeriodChange
(period) => void
—
unit
string
—
formatValue
(value) => string
—
legend
{ label, value?, note? }
—
reducedMotion
boolean
—
highlight
number
—

Accessibility

The card is role="figure" labelled by its title. The bars are a list named after the title; each bar is a tab stop named "label: value unit", and focusing it shows its tooltip. The axis and grid lines are hidden. With periods, the Select in the header is named "Period".

KeyAction
TaborShift+TabMoves from bar to bar and shows the focused bar’s value.