Skip to content
caliper ui docs

Pro

Liquidity heatmap

Resting size by price and time as a heatmap with an optional mid line.

Pro
pnpm dlx shadcn@latest add @caliper/liquidity-heatmap

KSTL liquidity

Opening session, 21 October · mid price marked

Resting size by price and time

Resting size by price and time
Price09:3009:4510:0010:1510:3010:45
101.00102744617895
100.50415875921936
100.00728916335067
99.50133047648198
99.00446178952239
Installs components/ui/liquidity-heatmap.tsxDepends on d3-shapeMotion none in component source

When to use

Use it for

  • Seeing how liquidity moved through a session.
  • Comparing walls of orders over time.

Skip it when

  • A single snapshot; use an order book.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/liquidity-heatmap

Adds its 3 files to components/ui/, each with its own stylesheet, and installs their packages. Pro installs with your access token, set up once per project. See Pro access. The first part also adds Caliper UI’s tokens; import them once as in Installation.

Usage

Import it from your copy of the source. The example behind the preview comes with the source.

example.tsx
import { LiquidityHeatmap } from "@/components/ui/liquidity-heatmap"

The worked example comes with Pro

The 30-line example behind the preview opens here, ready to copy.

  • 626 Pro parts, blocks and page templates, all with source
  • $149 once, with lifetime updates. No renewal
  • A full refund within 14 days if it is not for you
Checking your licence…

API reference

LiquidityHeatmap

component
PropTypeDefaultDescription
label *string—
times *readonly string[]—One label per column, oldest first.
prices *readonly number[]—One price per row, highest first.
values *readonly (readonly number[])[]—values[row][column]: resting size at that price and time.
midreadonly (number | undefined)[]—Optional mid price per column, drawn as a line.
normalize"all" | "column""all""column" scales each moment by its own densest level.
unitstring""
formatPrice((price: number) => string)(price) => price.toFixed(2)
formatSize((size: number) => string)numberText
loadingboolean—
errorstring—
classNamestring—

Accessibility

It exposes group and status semantics, with aria-label, aria-busy and aria-hidden kept in step with state. Changes that matter are announced through a live region.

KeyBehaviour
→Moves to the next item or value.
←Moves to the previous item or value.
↑Moves to the previous item or value.
↓Moves to the next item or value.
PageUpMoves by a larger step, or to the previous page.
PageDownMoves by a larger step, or to the next page.
HomeJumps to the first item or the minimum.
EndJumps to the last item or the maximum.
EscapeCloses or cancels, then returns focus to where it came from.

Motion

It declares no animation in its component source. Any transition comes from its stylesheet, which uses the duration tokens that collapse to instant under prefers-reduced-motion.

All Market charts examples