Skip to content
caliper ui pro docs

Order book

Bids and asks as depth bars around the spread.

Pro
Order book
Spread 0.20Mid 100.00

Order book
SidePriceSizeCumulative
Ask100.50178670
Ask100.40156492
Ask100.30134336
Ask100.20112202
Ask100.109090
Bid99.90120120
Bid99.80102222
Bid99.7084306
Bid99.6066372
Bid99.5048420

When to use

  • Market screens showing resting orders.
  • Anywhere two sides meet at a price.

When not to use

  • There is only one side.

Installation

terminal
pnpm dlx shadcn@latest add @caliper/order-book

Adds its 5 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.

API reference

OrderBook

9 props
PropTypeDefault
label *string—
bids *readonly BookLevel[]—
asks *readonly BookLevel[]—
levelsnumber8
formatPrice((price: number) => string)(price) => price.toFixed(2)
formatSize((size: number) => string)numberText
loadingboolean—
errorstring—
classNamestring—

Keyboard

  • No custom key handling; Tab and the native activation keys do the work.

Accessibility

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

Notes for AI

Give your coding assistant this page as Markdown instead of screenshots: the props, keyboard and examples in one file.

/docs/components/order-book.md

The index of every part is at /llms.txt.

More in Market charts