Skip to content

Crypto Dashboard for React

A crypto and finance dashboard template for React with candlesticks, live prices and a portfolio breakdown. Use it as a portfolio dashboard for a crypto or brokerage screen where the balance chart can be scrubbed to roll the big number to any moment or dragged to measure a move.

With demo data:npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/analytics-demo-finance.json

Portfolio

last 7 days

  • Cascade
  • FinanceDashboard
  • useCascade
  • defaultFinanceLabels
  • +2 more

Live portfolio

Hover the balance chart and the big number rolls to that moment; drag across it to measure a move (on touch: hold, then drag). Pick an asset in the watchlist to load its candles. Prices tick live with rolling digits.

Markets & holdings

Your balance, how each holding moves and every trade, with live prices.

Total balance

Price history

Price candles and volume. Pick another asset in the watchlist.

Allocation

Watchlist

Live prices · 24h change

Transactions

Every trade, transfer and payout in the range.

Files to copy

21 folders · 54 files · 4 packages
From theme/src/
  • blocks/{analytics-finance.tsx, analytics-kit.ts, icons.tsx}
  • components/button/
  • components/charts/{candlestick-chart.tsx, category-bar.tsx, chart-export-menu.tsx, chart-export.ts, chart-figure.tsx, chart-fit.tsx, chart-icons.tsx, chart-parts.tsx, chart-patterns.tsx, chart-pointer.tsx, chart-tip.tsx, chart-utils.ts, donut-chart.tsx, flow-utils.tsx, heatmap.tsx, sparkline.tsx, treemap.tsx}
  • components/charts/candlestick-chart/
  • components/charts/category-bar/
  • components/charts/chart-parts/
  • components/charts/heatmap/
  • components/drawer/parts/sheet.tsx
  • components/kbd/
  • components/menu/
  • components/segmented/
  • components/skeleton/
  • components/spinner/
  • components/status-icons/
  • components/tabs/
  • blocks/analytics-finance/
  • blocks/analytics/{bar-trend-chart.tsx, data.ts, glass.tsx, hooks.tsx, kpi.tsx, labels.ts, panel.tsx, shell.tsx, stacked-trend-chart.tsx, trend-chart.tsx, trend-frame.tsx}
  • hooks/{use-controllable.ts, use-direction.ts, use-intersection.ts, use-latest.ts, use-magnetic.ts, use-media-query.ts, use-preferences.ts, use-resolved-scheme.ts}
  • motion/{beat.ts, gate.ts, tokens.ts}
  • lib/{cn.ts, csv.ts, form.ts, glide-highlight.tsx, heading.ts, math.ts, no-script-reveal.tsx, popup-a11y.ts, popup-motion.ts, state-light.tsx, warn-once.ts}
  • styles/
shadcn CLI (component only)
npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/analytics-finance.jsonRegistry item: analytics-finance. The styles need the Tailwind v4 glass UI setup.
Packages
pnpm add @base-ui/react clsx motion tailwind-merge

Next.js: samples here pass functions (formatters, seriesLegend, a dashboard's load), so put them in a file that starts with "use client".

Euro, German formatting, stocks only

Every number and date follows the locale and currency; filters, the asset and Compare can start pre-set.

Aktien & ETFs

Kurse, Verlauf und Käufe der letzten 12 Monate.

Total balance

Price history

Price candles and volume. Pick another asset in the watchlist.

Allocation

Watchlist

Live prices · 24h change

Transactions

Every trade, transfer and payout in the range.

Loading, empty and error states

Your own `load` drives the dashboard. Try a slow network, an empty account and a failed request.

Portfolio from your API

Your balance, how each holding moves and every trade, with live prices.

Total balance

Price history

Price candles and volume. Pick another asset in the watchlist.

Allocation

Watchlist

Live prices · 24h change

Transactions

Every trade, transfer and payout in the range.

Data

load is required: FinanceDashboard never invents numbers. Return your own data (or a promise of it) from load. For demos and prototypes use the sample loader and live step from the separate @sheenui/theme/demo-data module:

import { FinanceDashboard } from "@/components/sheenui/blocks/analytics-finance";
// Package build (after the first npm release, or a packed tarball): import { FinanceDashboard } from "@sheenui/theme";
import { financeDemoLoader, financeLiveStep } from "@/components/sheenui/blocks/analytics/demo-finance";
// Package build (after the first npm release, or a packed tarball): import { financeDemoLoader, financeLiveStep } from "@sheenui/theme/demo-data";

<FinanceDashboard load={financeDemoLoader} liveStep={financeLiveStep} />

With the shadcn CLI the sample data is its own optional item, which also installs the dashboard (the “with demo data” command at the top of this page): npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/analytics-demo-finance.json. The “component only” command under Files to copy leaves the sample data out, which is what a production build wants.

Props

PropTypeDefaultDescription
load (required)(query: FinanceQuery, signal: AbortSignal) => FinanceData | Promise<FinanceData>NoneLoads the data for a query: return it, or a promise of it. Required: there is no built-in demo data (see @sheenui/theme/demo-data).
statusAnalyticsStatus"auto"Force a state for demos and tests: "loading", "empty" or "error". "auto" (default) follows the data.
liveStep((data: FinanceData, tick: number) => FinanceData) | nullnullEvolves the data while Live is on.
liveIntervalnumber1600Milliseconds between live updates.
rangeAnalyticsRangeNoneSets the active range when controlled.
defaultRangeAnalyticsRange"30d"The range at first when range is not controlled (AnalyticsRange, default "30d").
onRangeChange((range: AnalyticsRange) => void)NoneCalled when the range changes.
classesAssetClass[]NoneThe asset-class chips that are on (controlled); none selected means all classes.
defaultClassesAssetClass[][]The classes on at first when classes is not controlled (default none, i.e. all).
onClassesChange((classes: AssetClass[]) => void)NoneCalled when the class chips change.
assetstringNoneThe asset shown in the candlestick card (controlled / initial).
defaultAssetstring"BTC"The asset shown first when asset is not controlled (string, default "BTC").
onAssetChange((symbol: string) => void)NoneCalled when another asset is picked in the watchlist.
livebooleanNoneWhether live updates run (controlled).
defaultLivebooleantrueWhether live updates are on at first (boolean, default true).
onLiveChange((live: boolean) => void)NoneCalled when the Live toggle changes.
comparebooleanNoneWhether the previous period is shown (controlled).
defaultComparebooleanfalseWhether the comparison is on at first (boolean, default false).
onCompareChange((compare: boolean) => void)NoneCalled when the Compare toggle changes.
onExport((data: FinanceData, query: FinanceQuery) => void)downloads holdings and transactions as CSVCalled by the Export button.
currencystring"USD"Sets the ISO 4217 currency of every value.
nowDatethe current time"Now": the end of every range. On a prerendered page pass a fixed date, so the server's and the browser's first render print the same axes.
localestringthe runtime'sBCP 47 locale for every number and date (string, default the runtime's).
headingLevelHeadingLevelOption2Heading level of the title (1 to 6, default 2), or "none" for a paragraph with no heading role (panel titles follow).
glassAnalyticsGlass"auto"Glass on the cards: "auto" (default) keeps real glass while the device keeps up and falls back to a frosted solid surface on weak devices or when frames drop; "full" / "flat" force one.
labelsPartial<FinanceLabels>defaultFinanceLabelsEvery other string, for translation: labels={{ range: "…" }}; omitted keys keep the English of defaultFinanceLabels. All 60 keys of FinanceLabels are listed in the key table under the props table.
classNamestringNoneAdds extra classes to the root <section> (string).
FinanceLabels keys and English defaults (60)
Pass any key in labels; the rest keep the defaults of defaultFinanceLabels.
KeyEnglish default
rangeTime range
ranges{ "24h": "24h", "7d": "7d", "30d": "30d", "90d": "90d", "12m": "12m" }
rangeNames{ "24h": "Last 24 hours", "7d": "Last 7 days", "30d": "Last 30 days", "90d": "Last 90 days", "12m": "Last 1...
filtersFilters
liveLive
liveDescriptionUpdate the numbers in real time
compareCompare
compareDescriptionCompare with the previous period
exportExport
exportedCSV downloaded
loadingLoading new data…
loadedDashboard updated
chartChart
tableTable
viewAs(title) => `${title}: view as`
change(direction, amount) => direction === "flat" ? "No change vs previous period" : `${direction === "up" ? "Up"...
noChangeNo change vs previous period
kpisKey metrics
vsPrevious(value) => `vs ${value} before`
previousPeriodPrevious period
changeLabelChange
chartInstructionsUse the left and right arrow keys to read values; hold Shift to measure between two points; Escape clears.
touchHintTouch and drag to read values
noDataNo data
errorTitleCouldn't load the dashboard
errorDescriptionThe data source didn't answer. Check your connection and try again.
retryTry again
emptyTitleNo holdings yet
emptyDescriptionDeposit or buy an asset and your balance, prices and trades will show up here.
eyebrowPortfolio
titleMarkets & holdings
descriptionYour balance, how each holding moves and every trade, with live prices.
assetsFilterAssets
classes{ crypto: "Crypto", stocks: "Stocks", etf: "ETFs", cash: "Cash" }
balanceTotal balance
pastRange{ "24h": "Past 24 hours", "7d": "Past 7 days", "30d": "Past 30 days", "90d": "Past 90 days", "12m": "Past 1...
between(from, to) => `${from} → ${to}`
measureHintHover to read a value · drag across the chart to measure a move
measureHintTouchDrag to read a value · touch and hold, then drag, to measure
portfolioPortfolio
allocationTitleAllocation
donutDonut
treemapTreemap
allocationViewShow allocation as
totalTotal
candleTitle(symbol, name) => `${symbol} · ${name}`
candleDescriptionPrice candles and volume. Pick another asset in the watchlist.
watchlistTitleWatchlist
watchlistDescriptionLive prices · 24h change
watchRow(name, symbol, price, change) => `${name} (${symbol}), ${price}, ${change}`
transactionsTitleTransactions
transactionsDescriptionEvery trade, transfer and payout in the range.
noTransactions(range) => `No transactions in the ${range.toLowerCase()}.`
headers{ date: "Date", type: "Type", asset: "Asset", amount: "Amount", value: "Value", status: "Status" }
types{ buy: "Buy", sell: "Sell", deposit: "Deposit", withdrawal: "Withdrawal", reward: "Staking reward", dividen...
statuses{ completed: "Completed", pending: "Pending", failed: "Failed" }
noAssetsNo assets match these filters.
noHoldingsNo holdings yet. Deposit or buy an asset to see it here.
priceHistoryPrice history
exportFileportfolio

Data: FinanceData

PropTypeDefaultDescription
assetsFinanceAsset[]None{ symbol, name, class, quantity, price, open24h, spark } per holding or watched asset.
series{ time: number; value: number }[]NonePortfolio value over the range, evenly spaced (keep the same count across ranges and the line morphs point for point).
previousnumber[]NoneThe previous period's values, one per point of series (the dashed Compare line).
candlesRecord<string, Candle[]>NoneCandles over the range per symbol: { date, open, high, low, close, volume }.
transactionsFinanceTransaction[]None{ id, date, type, symbol, quantity, value, status }, newest first.

Keyboard

KeysAction
TabMoves through the header controls, then the balance chart, candles, allocation, each watchlist row and the transactions table.
←/→Balance chart: read the value at each point (the big number follows). Alt moves 10 points.
Shift + ←/→Balance chart: measure the move from where you started to the current point.
Home/EndBalance chart: first / latest point.
EscapeClears the reading or measurement.
Enter/SpaceWatchlist row: show that asset's candles.
+/− , Shift + ←/→Candlestick chart: zoom and pan.

Accessibility

  • The balance chart is keyboard-readable and announces each value (and the start and end of a measurement); the Table tab lists every point.
  • Watchlist rows are toggle buttons (aria-pressed) whose name says the asset, its price and its 24-hour change; the price flash is decorative.
  • Up / down is never color alone: candles are hollow or filled, badges carry arrows and signs, statuses carry icons and words.
  • Prices tick visually only (no announcement per tick); the Live switch pauses them, and they stop off-screen and in background tabs.
  • Reduced motion: no rolling digits, flashes, draw-ins or pings; data changes appear at once.
  • The transactions table scrolls inside its own focusable region with a sticky header, so the page never scrolls sideways on phones.

Dashboard kit (analytics-kit.tsx)

PropTypeDefaultDescription
AnalyticsShellcomponentNoneThe frame: a container-query root with the glass header (title, status pill, time-range control, filter chips, Live and Compare toggles, Export), loading announcements and the adaptive glass budget.
AnalyticsGridcomponentNoneContainer-query grid: 1 column under 42rem, 2 up to 64rem, 4 above. Give each panel a span so rows always fill.
AnalyticsPanelcomponentNoneGlass panel: header, Chart / Table tabs, a body that mounts near the viewport, a skeleton until ready and a dim veil (not a flash) while new data loads.
AnalyticsStatecomponentNoneThe empty and error states (with Retry), at the panel heading level.
KpiStripcomponentNoneKPI cells in one glass strip: rolling numbers, change badges with arrows, sparklines and previous-period figures. With onSelect it is a tablist that drives a chart.
RollingNumber / DeltaBadgecomponentNoneAn odometer number (one CSS transform per digit) and an up / down badge with an arrow and a signed number (color is never the only signal).
useDashboardData(load, query, key)hookNoneLoads data (sync or a promise), keeps the old data on screen while the next arrives, drops stale responses, retries, and updates in place for live mode.
useLiveTicker(enabled, onTick, { ref, interval })hookNoneAn interval that only runs while ref is on screen and the tab is visible.
useCascade(value, index)hookNoneHands new data to panel number index a beat after the previous one: a visible cascade, and no single long render task.
useAdaptiveGlass(ref, mode)hookNoneThe glass budget behind the glass prop: flat panels on weak devices, with lite glass, or once frames drop.

Cascade props

PropTypeDefaultDescription
value (required)TNoneThe data to hand to the children; panel number index receives it a beat after the one before.
index (required)numberNonePosition of this panel in the cascade (0 is first).
stepnumber45Milliseconds between one panel receiving new data and the next.

All exports on this page

  • Cascade — Render-prop form of useCascade: only this wrapper re-renders when its turn comes, so the parent (and its other panels) stay untouched.
  • FinanceDashboard — A finance / crypto dashboard: portfolio balance with a scrub-and-measure area chart, candles with volume for the selected asset.
  • defaultFinanceLabels — The English FinanceLabels used when labels is omitted; a partial labels prop is merged over them.
  • useCascade — Hands value on after index × step ms, in a transition: when a dashboard's data changes, its panels take the new data one after another.

When to use the crypto dashboard

  • Use it for the home screen of a trading or wallet app, where the balance chart is scrubbed to read the figure at any moment, or dragged to measure the gain between two points.
  • Use it for a trading watchlist with live ticking prices, candles with volume for the selected asset, and allocation as a donut or treemap beside a transactions table.
  • Use currency, locale, defaultClasses and defaultAsset to start on euros in German formatting with stocks and ETFs only and a chosen symbol like NWT.
  • Skip it when you need order entry or exchange-grade depth charts; this block is read-only analytics, so build trading forms with Input and Button, and use another chart for order books.
  • Pair it with CandlestickChart, DonutChart and Sparkline for custom panels, SegmentedControl for the range, and NumberTicker for any extra price figures you add.

Frequently asked questions

5 dashboards pages in all: browse them on All dashboards.

By Lokendra Singh Rathore (GitHub, opens in a new tab). Published , updated .