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
- Trading one market (trading-terminal).
- Your own holdings and P&L (portfolio).
- A sidebar market switcher (watchlist).
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
| Prop | Type | Default | Description |
|---|---|---|---|
markets (required) | ScreenerMarket[] | — | Markets shown by the screener. Required. |
watchlist / defaultWatchlist / onWatchlistChange | string[] | — | 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". |
updatedAt | number | 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 / ref | string / 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. |
watchlist | string[] | — | Controlled watchlist symbols; omit to use defaultWatchlist. |
defaultWatchlist | string[] | — | Initial watchlist symbols when uncontrolled. Defaults to an empty list. |
onWatchlistChange | ((symbols: string[]) => void) | — | Reports watchlist symbols after a change; no callback by default. |
screen | ScreenerScreen | — | Deprecated: Use filters.screen. |
defaultScreen | ScreenerScreen | — | Deprecated: Use defaultFilters.screen. |
onScreenChange | ((screen: ScreenerScreen) => void) | — | Deprecated: Use onFiltersChange. |
staleAfter | number | — | Prices older than this (ms) read as stale. Default 15 s. |
title | string | — | Title over the screen. Default "Markets". |
className | string | — | Classes on the documented visual root; no override by default. |
classNames | Partial<Record<"root" | "header" | "table" | "search" | "screens" | "overview" | "heatm… | — | 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. |
ref | Ref<HTMLElement> | — | Receives the documented root element; no ref by default. |
manual | boolean | — | Server owns ordering, filters, search and page slicing. Default false. |
sort | ListSort | — | |
defaultSort | ListSort | — | |
onSortChange | ((sort: ListSort) => void) | — | |
filters | ListFilters | — | |
defaultFilters | ListFilters | — | |
onFiltersChange | ((filters: ListFilters) => void) | — | |
query | string | — | |
defaultQuery | string | — | |
onQueryChange | ((query: string) => void) | — | |
selected | string[] | — | Stable row IDs, retained across server pages. |
defaultSelected | string[] | — | |
onSelectedChange | ((ids: string[]) => void) | — | |
selectable | boolean | — | |
loading | boolean | — | |
error | ReactNode | Error | — | Errors retain the last completed rows. Error objects are rendered by their message. |
emptyLabel | string | — | |
allowSelectAllMatching | boolean | — | |
onSelectAllMatching | ((scope: { rowCount: number; query: string; filters: ListFilters; }) => void) | — | |
pagination | boolean | — | Enable page controls explicitly. Page-related props also enable them, unless onEndReached is supplied. |
page | number | — | One-based requested page. Default 1. |
defaultPage | number | — | |
onPageChange | ((page: number) => void) | — | |
pageSize | number | — | Positive rows per page. Default 25. |
defaultPageSize | number | — | |
onPageSizeChange | ((pageSize: number) => void) | — | |
rowCount | number | null | — | Total matching rows on the server. null means unknown. Local grids calculate it before slicing. |
total | number | 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. |
hasMore | boolean | — | Whether another batch exists; defaults to true with onEndReached. False stops requests. |
loadingMore | boolean | — | An append request is pending; retain every loaded row. |
Built from
- market-heatmap
- data-grid
- sparkline
- category-bar
- chip-group
- search-field
- segmented-control
- button
- badge
- empty-state
- alert
- slot-text
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…