StockTicker

A watchlist. When a price changes its row washes green or red and fades, the trend line extends and the change pill turns with its sign. Finance.

Open playground
  • AAPL
    Apple Inc.
    $227.520.63%
  • MSFT
    Microsoft Corp.
    $431.180.63%
  • NVDA
    NVIDIA Corp.
    $138.072.12%
  • TSLA
    Tesla Inc.
    $248.401.72%
  • AMZN
    Amazon.com
    $197.930.78%

About

StockTicker is a React component in the Finance category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { StockTicker } from "@ashutoshswamy/smoui" and set items, currency.

Install

Terminal
npm i @ashutoshswamy/smoui

Usage

TSX
import { StockTicker } from "@ashutoshswamy/smoui";

<StockTicker items={[{ symbol: "AAPL", name: "Apple Inc.", price: 227.52, open: 226.1 }]} />

Props 2

items

Quotes. Change `price` as new ticks arrive; the change is measured from `open`.

{ symbol; name; price; open; history? }[]
currency

ISO currency code.

stringdefault "USD"