Market screener

A React block (a whole screen) in Beamline's Trading app.

The whole market at a glance and a way to narrow it down: a sector heatmap, today's top movers with the market's breadth, ready-made screens (gainers, losers, most active, your watchlist) and a live table to search, sort and star markets into the watchlist.

Use it for

  • The markets overview of a trading or investing app: what moved, where, and which markets to watch or open.
  • Finding markets by a few criteria and adding them to a watchlist.

Not for

Anatomy

  • header: title, feed state (live, or how old the prices are), search, and the ready-made screens as chips with counts
  • heatmap: markets by sector, tile area by market cap, colour by the day's change; a tile picks the market
  • movers: top gainers and losers of the screen in view, each with its change in words and glyph, and the breadth (advancing, flat, declining) as one bar
  • table: star (watchlist), market, price, 24h change, 7-day trend, volume, market cap, sector; sortable, searchable; a row opens the market

Variants

  • 0: room: heatmap above movers under 56rem, side by side from 56rem; the table keeps at least 22rem of height and the page scrolls past the overview on short screens

States

  • loading (heatmap, movers and table held in their shapes)
  • live
  • stale (prices older than a threshold: a warning chip says how old, values stay)
  • feed error (says so, Retry; the last prices stay, marked stale)
  • no matches for the search or screen (says which, clear)
  • empty watchlist (how to add)
  • unmeasured change or cap (hatched tile, — in the table)
  • Breadth counts only measured changes as up, flat or down and names the unmeasured market count separately.

Keyboard

  • Screens: arrow keys move between chips
  • Heatmap: arrow keys move between tiles, Enter picks
  • Table: arrows move between cells, Enter opens the row's market; the star is a toggle button
  • Search: / focuses it, Escape clears

Motion

Prices change in place each tick; the movers re-rank only when a market's place changes, and the change values roll. The star fills on a short spring. Live market rows never slide. Nothing animates between ticks.

Props

PropTypeDefaultDescription
markets (required)ScreenerMarket[]—Markets shown by the screener. Required.
watchlist / defaultWatchlist / onWatchlistChangestring[]—watchlist: Controlled watchlist symbols; omit to use defaultWatchlist. defaultWatchlist: Initial watchlist symbols when uncontrolled. Defaults to an empty list. onWatchlistChange: Reports watchlist symbols after a change; no callback by default.
screen / defaultScreen / onScreenChange"all" | "gainers" | "losers" | "active" | "watchlist"—screen: Deprecated: Use filters.screen. defaultScreen: Deprecated: Use defaultFilters.screen. onScreenChange: Deprecated: Use onFiltersChange.
status"loading" | "live" | "stale" | "error""live"Where the feed stands. Default "live".
updatedAtnumber | null—When prices last arrived (ms).
onOpenMarket(symbol: string) => void—Opens the supplied market symbol; no handler by default.
onRetry(() => void)—Runs the retry action for the failed operation; no handler by default.
className / classNames / style / refstring / MarketScreenerClassNames / CSSProperties / Ref<HTMLElement>—className: Classes on the documented visual root; no override by default. classNames: Classes for the named visual parts; no part overrides by default. style: Inline styles on the documented visual root; no inline overrides by default. ref: Receives the documented root element; no ref by default.
watchliststring[]—Controlled watchlist symbols; omit to use defaultWatchlist.
defaultWatchliststring[]—Initial watchlist symbols when uncontrolled. Defaults to an empty list.
onWatchlistChange((symbols: string[]) => void)—Reports watchlist symbols after a change; no callback by default.
screenScreenerScreen—Deprecated: Use filters.screen.
defaultScreenScreenerScreen—Deprecated: Use defaultFilters.screen.
onScreenChange((screen: ScreenerScreen) => void)—Deprecated: Use onFiltersChange.
staleAfternumber—Prices older than this (ms) read as stale. Default 15 s.
titlestring—Title over the screen. Default "Markets".
classNamestring—Classes on the documented visual root; no override by default.
classNamesPartial<Record<"root" | "header" | "table" | "search" | "screens" | "overview" | "heatm…—Classes for the named visual parts; no part overrides by default.
styleCSSProperties—Inline styles on the documented visual root; no inline overrides by default.
refRef<HTMLElement>—Receives the documented root element; no ref by default.
manualboolean—Server owns ordering, filters, search and page slicing. Default false.
sortListSort—
defaultSortListSort—
onSortChange((sort: ListSort) => void)—
filtersListFilters—
defaultFiltersListFilters—
onFiltersChange((filters: ListFilters) => void)—
querystring—
defaultQuerystring—
onQueryChange((query: string) => void)—
selectedstring[]—Stable row IDs, retained across server pages.
defaultSelectedstring[]—
onSelectedChange((ids: string[]) => void)—
selectableboolean—
loadingboolean—
errorReactNode | Error—Errors retain the last completed rows. Error objects are rendered by their message.
emptyLabelstring—
allowSelectAllMatchingboolean—
onSelectAllMatching((scope: { rowCount: number; query: string; filters: ListFilters; }) => void)—
paginationboolean—Enable page controls explicitly. Page-related props also enable them, unless onEndReached is supplied.
pagenumber—One-based requested page. Default 1.
defaultPagenumber—
onPageChange((page: number) => void)—
pageSizenumber—Positive rows per page. Default 25.
defaultPageSizenumber—
onPageSizeChange((pageSize: number) => void)—
rowCountnumber | null—Total matching rows on the server. null means unknown. Local grids calculate it before slicing.
totalnumber | null—Deprecated: Use rowCount. Canonical rowCount wins, including null.
onEndReached(() => void | Promise<unknown>)—Append mode: fetch another batch. The app appends it to the supplied rows.
hasMoreboolean—Whether another batch exists; defaults to true with onEndReached. False stops requests.
loadingMoreboolean—An append request is pending; retain every loaded row.

Built from

Dependencies

lucide-react, @tanstack/react-virtual

Import

import { MarketScreener } from "@beamline/market-screener";

Get it

Market screener 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

  • Trading terminal: A perpetuals terminal on your feed and your account: ticker tape, market header with funding, candles, book / trades / depth, order ticket, account…
  • Portfolio overview: What an account holds and how it is doing: the total that rolls as prices tick with today's change, value over time against a benchmark, allocation by…

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.