Trades tape
A React component in Beamline's Trading category.
Recent trades, newest first, with side glyphs, large-print marking and one-time arrival flashes.
Use it for
- Recent market trades (time and sales): beside the order book to show what is actually trading.
- A docked column (200–360px: price and size first) or a wide tile that adds each print's value.
Not for
- The user's own fills → a data-grid or positions view.
Anatomy
- header (title, stale chip, readout of the print pointed at)
- column headers
- row (▲/▼ + price in side colour, size, value from 26rem, time)
- soft bottom edge where the oldest prints leave
Variants
- density: compact (20px rows), default (24px), comfortable (28px)
- time: clock, relative
States
- live (new prints flash once in place)
- large print (side-tinted row, bold size)
- probed print (hover: the row lights and the header reads it whole: side, size, value, time; in a narrow tape the size, already in the row, gives way to the value)
- held print (touch: a tap lights the print and the header reads it, following it down as new prints arrive, until it is tapped again or the finger touches elsewhere)
- room: under 15rem Time folds (the readout still shows it); from 26rem a Value column (price × size) joins
- stale (caller's chip in the header; prints stay)
- empty
- Density: explicit instance prop, then scoped component default, then managed root density; omitted static-scope density stays inherited. Changes keep row identity and focus.
Keyboard
- Read-only table; no interactive parts (screen readers read every column, folded or not, from the cells).
Motion
A new print tints its row in its side's colour and fades over 600ms; rows never slide, so the eye stays on the numbers, and a re-render (a second ticking, a hover) never cuts a fade. The header readout arrives at 0ms and leaves over --pui-motion-out. Seconds-ago only ticks while the tape is on screen in a visible tab. Reduced motion: no fade, prints still arrive.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
trades (required) | Trade[] | — | Trade prints displayed newest first. Required. |
largeSize | number | — | Trades at or above this size are marked as large. |
limit | number | 30 | Rows shown. |
priceDecimals / sizeDecimals | number | — | priceDecimals: Decimals for price. sizeDecimals: Maximum fractional digits used for trade sizes. Defaults to 4. |
time | 'clock'|'relative' | — | Time format: clock time or seconds ago. |
stale | ReactNode | — | Caller-owned stale description, e.g. "Stale · 12s": shown as a chip in the header; the prints stay readable. |
density | 'compact'|'default'|'comfortable' | — | Row height 20 / 24 / 28 px, as the order book. Omitted: the nearest scope's density. |
style / ref | CSSProperties / 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. |
classNames | TradesTapeClassNames | — | Classes for the named visual parts; no part overrides by default. |
style | CSSProperties | — | Inline styles on the documented visual root; no inline overrides by default. |
priceDecimals | number | — | Decimals for price. |
sizeDecimals | number | — | Maximum fractional digits used for trade sizes. Defaults to 4. |
base | string | — | Base asset label used with trade sizes. Defaults to "Size". |
quote | string | — | Quote currency shown with prices or totals. Defaults to "Price". |
className | string | — | Classes on the documented visual root; no override by default. |
ref | Ref<HTMLDivElement> | — | Receives the documented root element; no ref by default. |
Built from
Used in
Import
import { TradesTape } from "@beamline/trades-tape";
Get it
Trades tape 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.
- Market heatmap: Treemap of markets sized by weight and coloured by change, grouped by sector, with hatched no-data tiles.
- 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.
- 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.