Market heatmap

A React component in Beamline's Trading category.

Treemap of markets sized by weight and coloured by change, grouped by sector, with hatched no-data tiles.

Use it for

  • Market overview: what moved and how big it is.

Not for

Anatomy

  • group labels
  • tile (symbol; ▲/▼ and signed change when the tile is big enough)
  • hover card
  • legend
  • List toggle and list view: the same markets as rows (symbol, name, change, weight), largest first — the equivalent of tiles too small to tap

Variants

  • saturateAt: fraction

States

  • up
  • down
  • no data (hatched)
  • list (the List toggle, or `view="list"`): rows of at least 32px replace the map
  • room: fills any height with height="fill" (the map takes what the legend leaves); the legend folds "Area = …" under 30rem and the no-data key under 22rem, and its scale shrinks before anything is cut
  • tile hover (brightens at once) / press (dims at once) / focus (inset ring and the hover card)
  • current market (value: an ink ring inside its tile; in the list a tint and a rule; aria-current)

Keyboard

  • The map is one tab stop: ←/→/↑/↓ move to the nearest tile that way, Home/End to the largest/smallest; focus shows the hover card. Every tile is a button with a spoken direction and change.
  • List is a toggle button (icon + word) before the legend; in list view each row is a button when onSelect is given

Motion

Hover brightens at once and leaves over --pui-motion-out; a press dims at once. Map and list fade in as each other's replacement. Live changes recolour and re-tile in place, never travelling.

Props

PropTypeDefaultDescription
items (required){ symbol, name?, group?, weight, change }[]—Items rendered in the component. Required.
saturateAtnumber0.05Change at which colour saturates, as a fraction (0.05 = ±5%).
heightnumber | 'fill'420Map height in px, or "fill": the height the parent gives the heatmap, less its legend.
onSelect(symbol) => void—Called when an item is activated; no handler by default.
valuestring | null—The market on screen: its tile is ringed and its list row marked (aria-current).
legendbooleantrueShows labels and colour keys for the data. Defaults to true.
weightLabelstring"Market cap"Label for the measure that determines tile area. Defaults to "Market cap".
view / defaultView / onViewChange"map" | "list""map"view: Map or list. Small tiles are hard to tap on a phone; the list shows the same markets as full-size rows. Controlled or not; the List toggle beside the legend switches it. defaultView: Initial view when uncontrolled. Defaults to "map". onViewChange: Reports view after a change; no callback by default.
style / refCSSProperties / native Ref—style: Inline styles on the documented visual root; no inline overrides by default. ref: Receives the documented root element; no ref by default.
classNamesMarketHeatmapClassNames—Classes for the named visual parts; no part overrides by default.
styleCSSProperties—Inline styles on the documented visual root; no inline overrides by default.
view"list" | "map"—Map or list. Small tiles are hard to tap on a phone; the list shows the same markets as full-size rows. Controlled or not; the List toggle beside the legend switches it.
defaultView"list" | "map"—Initial view when uncontrolled. Defaults to "map".
onViewChange((view: "map" | "list") => void)—Reports view after a change; no callback by default.
classNamestring—Classes on the documented visual root; no override by default.
refRef<HTMLDivElement>—Receives the documented root element; no ref by default.

Used in

Dependencies

d3-hierarchy

Import

import { MarketHeatmap } from "@beamline/market-heatmap";

Get it

Market heatmap is part of Beamline UI. Install the parts you need in your React app as compiled packages or editable source. Get Beamline · Connect your agent

More in Trading

  • Price chart: Candles, line or area price chart with volume, OHLC legend and reference lines, built for live ticks.
  • Order book: Asks, spread and bids with cumulative depth bars, grouping, change flashes and keyboard price picking.
  • Options chain: Calls and puts for one expiry around a centre column of strikes: bid, ask, implied volatility, delta, volume and open interest, the money shaded in, a…
  • Depth chart: Cumulative bid and ask depth as stepped areas around the mid, with hover readout.
  • Ticker tape: A continuously scrolling row of symbols with price, change and mini trend; anyone can hold it: hover, keyboard focus or a tap.
  • Watchlist: A selectable, sortable list of markets with mini trends, prices, changes and stars.
  • Trades tape: Recent trades, newest first, with side glyphs, large-print marking and one-time arrival flashes.
  • Order ticket: Buy/sell order entry with limit, market and stop types, % of balance, inline validation and a live cost summary.
  • Swap form: Exchange one token for another: type what you pay (or Max), pick each token from a searchable list with balances, and the form quotes what you receive…
  • Positions table: Open positions with live unrealised PnL, liquidation warnings and close actions.
  • P&L calendar: A trader's month at a glance: every trading day's profit or loss in its cell, shaded deeper the bigger it was in the gain or loss colour and marked ▲ or…
  • Price ticker: Symbol, last price with a directional flash, 24h change and stats.
  • Funding countdown: Perpetual funding rate with who pays, and a live countdown ring to the next funding.

Part of Beamline UI: polished, editable React components and complete screens for custom applications. Build your own style from any look; tokens, fonts, radii, motion; not only colours.