Skip to content
uiify

Candle chart

Static OHLC candlestick chart with a CSS-only renderer.

Browsers
Chrome 123+Firefox 121+Safari 17.5+
Tier
0
Forced layout budget
0 ms
Axe budget
0
SSR compatible
Yes
Published contract
Test harness

Playground

Candle chart

100 daily OHLC items with CSS geometry, automatic axes, and an optional interactive client entry.

CSS-only chart

BTC / USD daily candles
TimeOpenHighLowClose
2025-08-2024000242002387524060
2025-08-2124166245672402324405
2025-08-2224324245082410224263
2025-08-2324470246762423624415
2025-08-2424598250522447324824
2025-08-2524703248612456024721
2025-08-2624782249442446824629
2025-08-2724834251552465524971
2025-08-2824859251562473424950
2025-08-2924859250872451524658
2025-08-3024836249802467524840
2025-08-3124797250922461824930
2025-09-0124746249302443924564
2025-09-0224689248952441524558
2025-09-0324633249932447224765
2025-09-0424584247242430324482
2025-09-0524548247102420224327
2025-09-0624530248032438724619
2025-09-0724533247522437224546
2025-09-0824559247872414324322
2025-09-0924609247662448424626
2025-09-1024683249692454024807
2025-09-1124776249602444124602
2025-09-1224886250922464724826
2025-09-1325008254312488325203
2025-09-1425135252752493925082
2025-09-1525261254232498325144
2025-09-1625380257652520125581
2025-09-1725486257782536125572
2025-09-1825574258022529625439
2025-09-1925639259192547825779
2025-09-2025678260352549925873
2025-09-2125691258752545525580
2025-09-2225678259162553525710
2025-09-2325641261072548025879
2025-09-2425582257222535325532
2025-09-2525507256692529425419
2025-09-2625422258082527925624
2025-09-2725332255642517125358
2025-09-2825246254742488725066
2025-09-2925168254072504325267
2025-09-3025106253612496325199
2025-10-0125064252482469124852
2025-10-0225046252522483025009
2025-10-0325055254132493025185
2025-10-0425092252322477524918
2025-10-0525156253182483524996
2025-10-0625245255542506625370
2025-10-0725354255602515225277
2025-10-0825480257082510825251
2025-10-0925616258352545525695
2025-10-1025755259632557625801
2025-10-1125892260762554625671
2025-10-1226021262362587826030
2025-10-1326135265182597426290
2025-10-1426230263702591126090
2025-10-1526302264642611326238
2025-10-1626351267482620826564
2025-10-1726376265822620326364
2025-10-1826379266072608426263
2025-10-1926361267012623626561
2025-10-2026329266102618626448
2025-10-2126286264702599426155
2025-10-2226239265652606026359
2025-10-2326194266322606926404
2025-10-2426158262982591226055
2025-10-2526136262982597426135
2025-10-2626134265482595526364
2025-10-2726154263602598726112
2025-10-2826199264272593326076
2025-10-2926271265842611026444
2025-10-3026368265622618926400
2025-10-3126488266722615926284
2025-11-0126627268922648426686
2025-11-0226780271042661926876
2025-11-0326941270812654526724
2025-11-0427103272652690427029
2025-11-0527261275732711827389
2025-11-0627406276122708727248
2025-11-0727535277632717427353
2025-11-0827641279012751627761
2025-11-0927721278832753227675
2025-11-1027774279582738527546
2025-11-1127799280782762027872
2025-11-1227797281082767227880
2025-11-1327771279112743027573
2025-11-1427726278902756527728
2025-11-1527666280352748727851
2025-11-1627598278042737027495
2025-11-1727527277552731527458
2025-11-1827462278272730127687
2025-11-1927407275952722827433
2025-11-2027368275522712527250
2025-11-2127349277462720627540
2025-11-2227353277272719227499
2025-11-2327382275222707427253
2025-11-2427435276892731027527
2025-11-2527510279102736727726
2025-11-2627604278102734527506
2025-11-2727712279402749527674

Interactive chart

Interactive BTC / USD daily candles
2025-11-27O 27712H 27940L 27495C 27674
  1. Aug 25
  2. Sep 25
  3. Oct 25
  4. Nov 25
  1. 28,108
  2. 27,261.4
  3. 26,414.8
  4. 25,568.2
  5. 24,721.6
  6. 23,875
TimeOpenHighLowClose
2025-08-2024000242002387524060
2025-08-2124166245672402324405
2025-08-2224324245082410224263
2025-08-2324470246762423624415
2025-08-2424598250522447324824
2025-08-2524703248612456024721
2025-08-2624782249442446824629
2025-08-2724834251552465524971
2025-08-2824859251562473424950
2025-08-2924859250872451524658
2025-08-3024836249802467524840
2025-08-3124797250922461824930
2025-09-0124746249302443924564
2025-09-0224689248952441524558
2025-09-0324633249932447224765
2025-09-0424584247242430324482
2025-09-0524548247102420224327
2025-09-0624530248032438724619
2025-09-0724533247522437224546
2025-09-0824559247872414324322
2025-09-0924609247662448424626
2025-09-1024683249692454024807
2025-09-1124776249602444124602
2025-09-1224886250922464724826
2025-09-1325008254312488325203
2025-09-1425135252752493925082
2025-09-1525261254232498325144
2025-09-1625380257652520125581
2025-09-1725486257782536125572
2025-09-1825574258022529625439
2025-09-1925639259192547825779
2025-09-2025678260352549925873
2025-09-2125691258752545525580
2025-09-2225678259162553525710
2025-09-2325641261072548025879
2025-09-2425582257222535325532
2025-09-2525507256692529425419
2025-09-2625422258082527925624
2025-09-2725332255642517125358
2025-09-2825246254742488725066
2025-09-2925168254072504325267
2025-09-3025106253612496325199
2025-10-0125064252482469124852
2025-10-0225046252522483025009
2025-10-0325055254132493025185
2025-10-0425092252322477524918
2025-10-0525156253182483524996
2025-10-0625245255542506625370
2025-10-0725354255602515225277
2025-10-0825480257082510825251
2025-10-0925616258352545525695
2025-10-1025755259632557625801
2025-10-1125892260762554625671
2025-10-1226021262362587826030
2025-10-1326135265182597426290
2025-10-1426230263702591126090
2025-10-1526302264642611326238
2025-10-1626351267482620826564
2025-10-1726376265822620326364
2025-10-1826379266072608426263
2025-10-1926361267012623626561
2025-10-2026329266102618626448
2025-10-2126286264702599426155
2025-10-2226239265652606026359
2025-10-2326194266322606926404
2025-10-2426158262982591226055
2025-10-2526136262982597426135
2025-10-2626134265482595526364
2025-10-2726154263602598726112
2025-10-2826199264272593326076
2025-10-2926271265842611026444
2025-10-3026368265622618926400
2025-10-3126488266722615926284
2025-11-0126627268922648426686
2025-11-0226780271042661926876
2025-11-0326941270812654526724
2025-11-0427103272652690427029
2025-11-0527261275732711827389
2025-11-0627406276122708727248
2025-11-0727535277632717427353
2025-11-0827641279012751627761
2025-11-0927721278832753227675
2025-11-1027774279582738527546
2025-11-1127799280782762027872
2025-11-1227797281082767227880
2025-11-1327771279112743027573
2025-11-1427726278902756527728
2025-11-1527666280352748727851
2025-11-1627598278042737027495
2025-11-1727527277552731527458
2025-11-1827462278272730127687
2025-11-1927407275952722827433
2025-11-2027368275522712527250
2025-11-2127349277462720627540
2025-11-2227353277272719227499
2025-11-2327382275222707427253
2025-11-2427435276892731027527
2025-11-2527510279102736727726
2025-11-2627604278102734527506
2025-11-2727712279402749527674

Live stream

A simulated trade feed with volatility clustering and drifting trends. Every candle lives in a horizontal VirtualScroll sized to show 20 at a time: scroll back through the history, and the chart follows new candles again once you return to the newest one.

Live BTC / USD one-minute candles
10:29O 63973.85H 63993.3L 63888.51C 63888.51
  1. 10:05
  2. 10:10
  3. 10:15
  4. 10:20
  5. 10:25
  1. 64,365.59
  2. 64,251.48
  3. 64,137.38
  4. 64,023.27
  5. 63,909.17
  6. 63,795.06
TimeOpenHighLowClose
10:1064342.7464343.9664284.564343.96
10:1164343.9664365.5964281.2964365.59
10:1264365.5964365.5964268.4564323.33
10:1364323.3364354.5464279.5964316.85
10:1464316.8564316.8564192.764226.09
10:1564226.0964226.0964147.2264162.9
10:1664162.964211.2764118.7664118.76
10:1764118.7664150.4664028.6764061.06
10:1864061.0664061.0663901.4263901.42
10:1963901.4263901.4263811.1663867.61
10:2063867.6163899.4163795.0663795.06
10:2163795.0663864.0763795.0663859.14
10:2263859.1463895.1863832.4963895.18
10:2363895.1863895.1863820.0263833.26
10:2463833.2663910.9563827.5463910.95
10:2563910.9563980.3763896.7463975.28
10:2663975.2864031.1463961.3564017.19
10:2764017.1964106.4764017.1964102.34
10:2864102.3464118.4863973.1863973.85
10:2963973.8563993.363888.5163888.51

API

CandleChart

PropTypeDefaultDescription
data*readonly CandleChartData[]—OHLC records; each item contains time, open, high, low, and close values.
aria-labelstring"Candlestick chart"Accessible name used for the chart and its data table.
xAxisreadonly CandleChartAxisLabel[]—Optional custom bottom-axis labels. Each item supplies arbitrary React content and a position from 0 to 100 percent.
yAxisreadonly CandleChartAxisLabel[]—Optional custom right-axis labels. Each item supplies arbitrary React content and a position from 0 to 100 percent.
interactiveboolean—Enables candle hit areas, crosshair state, keyboard activation, and the React-rendered OHLC readout; CandleChartClient sets this automatically.
renderReactElement | ((props, state) => ReactElement)—Replace the rendered element while keeping behavior and accessibility wiring.

CandleChartClient (@gunkin/uiify/components/candle-chart/client)

PropTypeDefaultDescription
data*readonly CandleChartData[]—The same OHLC data as CandleChart; the client adds wheel zoom, horizontal scrolling, a candle-snapped crosshair, keyboard candle selection, sticky axis values and an OHLC readout.
visibleCountnumber—Live mode: N candles fill the viewport; history is virtualized. Axes, readout and table track visible candles; the chart follows new ones unless scrolled back, with zoom and announcements off.

useChartViewport (@gunkin/uiify/hooks)

PropTypeDefaultDescription
itemCount*number—Number of candles in the viewport model.
initialScalenumber3.2Initial CSS scale; the viewport starts pinned to the right edge.
minScale / maxScalenumber—Optional zoom bounds. Zoom never shrinks the chart below its container; the default maximum is half the item count, so 100 items cap at 50% per candle slot.

Keyboard

KeyAction
TabFocus an interactive candle
Enter / SpaceSelect the focused candle and update the readout

Accessibility

The static candle glyphs are decorative and the figure includes a visually hidden table with the original time, open, high, low, and close values. The optional client entry makes candles keyboard-focusable, adds wheel zoom, native horizontal scrolling, a snapped crosshair, and a React-rendered OHLC readout while preserving that table.

Styling hooks

data-uiify-candle-chartdata-interactivedata-directiondata-timedata-crosshair-activedata-axis--candle-x--candle-slot--candle-wick-top--candle-wick-height--candle-body-top--candle-body-height--candle-axis-x--candle-axis-y--candle-scale--candle-crosshair-x--candle-cursor-y