Skip to content
Charts55Components12Visuals14ASCII45
GitHubGet startedGet started
All chartsWatchlistFinance
PreviousNext: Market map

FinanceFI-07

Watchlist

Every instrument you follow on one card: its path today, where it sits in its range, its price and its move.

Part
FI-07
Component
WatchlistCard
From
@lilt-ui/charts/finance

Watchlist

+2.0%+2.0%average move · 4 up, 2 down
Watchlist
Recent pricesRange
SOLSolana$205.56$205.56+4.2%+4.2%
ETHEthereum$3,114.78$3,114.78−1.2%−1.2%
BTCBitcoin$64,912.50$64,912.50+2.3%+2.3%
JUPJupiter$1.02$1.02+8.5%+8.5%
LINKChainlink$14.21$14.21−2.8%−2.8%
AVAXAvalanche$28.04$28.04+0.9%+0.9%
Default01 / 02

Installation

One package, one sheet.

Add the package, then import the component and the stylesheet once. See Getting started for theming.

$npm install @lilt-ui/charts
import { WatchlistCard } from '@lilt-ui/charts/finance';
import '@lilt-ui/charts/styles.css';

Usage

The default card.

The default card above, as you would write it.

<WatchlistCard
  title="Watchlist"
  ranges={[
    { id: '1d', label: '1D', data: today },
    { id: '1w', label: '1W', data: week },
  ]}
  symbol="symbol"
  name="name"
  price="price"
  change="change"
  history="history"
  low="low"
  high="high"
/>

Omit title to leave out the visible title. Set header={false} to remove the whole header, and use aria-label to name a chart inside your own card. surface="ghost" controls only the visual frame. See Card composition.

Data

The shape it reads.

change is a fraction of the price at the start of the period: 0.0424 shows +4.2%. The sparkline is drawn green or red by that change, and history only needs to be in order; missing points are skipped. With low and high, a range shows where the price sits between them. Symbols identify rows, so keep them unique. When prices stream in, pass new rows: each price rolls to its new value rather than redrawing the list.

// One row per instrument. history is recent prices, oldest first.
const quotes = [
  {
    symbol: 'SOL',
    name: 'Solana',
    price: 205.56,
    change: 0.0424,
    history: [197.2, 199.1, 198.4, 203.8, 205.56],
    low: 196.6,
    high: 207.1,
  },
];

Props28

Every prop.

Every prop WatchlistCard accepts, in the order you are likely to reach for them.

PropTypeDescription
titlestringOptional visible title. Also names the list unless aria-label is set.
headerbooleanFalse removes the title and headline. Defaults to true.
aria-labelstringAccessible name, independent of the visible title.
dataRow[]One row per instrument. Omit when using ranges.
rangestringStatic period label, e.g. Today.
ranges{ id, label, data }[]Period select. Each period swaps the rows: prices and moves roll, sparklines reshape and range ticks slide.
defaultRangestringInitial period id.
symboltext key of RowTicker, unique per row.
nametext key of RowFull name under the ticker.
pricenumeric key of RowLatest price.
changenumeric key of RowFractional move over the period: 0.012 is up 1.2%.
historykey of Row holding number[]Recent prices, oldest first, drawn as a sparkline.
lownumeric key of RowPeriod low, for the range column.
highnumeric key of RowPeriod high, for the range column.
sort'none' | 'symbol' | 'price' | 'change'Initial order. None (default) keeps yours.
sortablebooleanLet readers sort from the column headings. Defaults to true.
valueFormatIntl.NumberFormatOptionsPrice format. Defaults to US dollars with cents.
localestringLocale for numbers; defaults to en-US.
surface'elevated' | 'outline' | 'ghost'Card treatment.
palette'spectrum' | 'iris' | 'cobalt' | 'emerald'Accent colors inside the card.
numberStyle'count' | 'pop' | 'slide' | 'roll' | 'flow' | 'scramble'How prices and the headline animate when they change. Count by default.
loadingbooleanShows a neutral loading skeleton, not data.
loadingStyle'shimmer' | 'draw' | 'breathe'Shimmer sweeps a highlight over still shapes; draw reveals them in order; breathe lets them settle. Follows the selected look, including depth, and respects reduced motion.
empty'dots' | 'shape' | ReactElement | nullWhat the card shows when the period has no data. Dots (default) gathers a quiet dot field around the message; shape lays the chart’s own outline behind it. Pass `<ChartEmpty>` with your own words, any element of your own, or null for nothing. Both looks stay still, so empty never reads as loading, and the headline reads a dash, never zero.
motion'auto' | 'none'None turns off decorative motion.
classNamestringClass on the card frame.
styleCSSProperties | ChartStyleInline styles and scoped chart variables.
onSelectionChange(row | null) => voidReports the hovered or focused row, or null when the pointer leaves.
Previous chartPortfolioNext chartMarket map

Ready when your data is. Start with one install.

Install a package, import the stylesheet once, and drop in a card or a scene.

Read the guideRead the guideView on GitHubView on GitHub
ChartsAll chartsAll chartsFinanceFinanceCustomizeCustomizeFeaturesFeatures
ComponentsAll componentsAll componentsAIAIStatusStatusActionsActionsDataData
VisualsAll visualsAll visualsAIAIDataDataSecuritySecurityProductProduct
ASCIIAll scenesAll scenesTextTextInterfaceInterfaceBackgroundsBackgroundsMediaMediaDataData
DocsGetting startedGetting startedAPI referenceAPI referenceMotion & accessibilityMotion & accessibilityllms.txtllms.txt
React components with a little lilt.GitHubGitHubnpmnpm