Crypto Markets

3 variants

Market tables and trading panels for exchanges and wallets, with live-ticking prices, depth, and fills.

Live price table

A sortable market table where prices roll and flash as they tick, with category tabs, a watchlist, seven-day sparklines, and market totals.

Markets

Live
Total market cap
$1.90T
24h volume
$102.49B
Top gainer
PEPE+8.15%
BitcoinBTC
$60,284.10+1.12%
EthereumETH
$2,412.38+2.41%
TetherUSDT
$1.00−0.02%
BNBBNB
$548.20−0.84%
SolanaSOL
$142.65+4.37%
USD CoinUSDC
$1.00+0.01%
XRPXRP
$0.5421−1.66%
DogecoinDOGE
$0.1123+6.82%
ToncoinTON
$5.42−2.94%
CardanoADA
$0.3618+0.73%
AvalancheAVAX
$26.14+3.18%
ChainlinkLINK
$14.82−1.84%
DaiDAI
$1.00+0.00%
UniswapUNI
$8.41+3.67%
PepePEPE
$0.0000094+8.15%
PolygonPOL
$0.38−0.54%
ArbitrumARB
$0.62−2.37%
AaveAAVE
$162.50−0.92%
OptimismOP
$1.48+4.06%

Sample prices with a simulated live feed. Not market data.

"use client";

import { CryptoMarkets } from "@/components/premium/crypto-markets";

export function CryptoMarketsPreview() {
  return <CryptoMarkets />;
}

Install

$ bunx --bun shadcn add @beui-pro/crypto-markets-table

API Reference

Every prop is optional unless marked required. Data, copy, and colors default to the sample content.

CryptoMarkets8 props
  • coins

    Coins to list, ranked by market cap. Defaults to the sample coins.

    readonly MarketCoin[]
  • categories

    Category filter tabs shown after All and Watchlist.

    readonly MarketCategory[]
  • labels

    Text overrides merged over the default English labels.

    Partial<MarketsLabels>
  • live

    Simulate a live price feed. Turn off when streaming real prices into `coins`.

    boolean

    Default true

  • defaultWatchlist

    Coin ids starred on first render; later changes are ignored.

    readonly string[]

    Default ["btc", "eth", "sol"]

  • onWatchlistChange

    Called with the starred coin ids after a coin is starred or unstarred.

    ((ids: string[]) => void)
  • onSelectCoin

    Makes coin names clickable, for example to open a detail page.

    ((coin: MarketCoin) => void)
  • className

    Classes merged onto the root element.

    string
Types3 types

The object types these props take, field by field.

MarketCategory2 fields
  • idRequired

    Category id that coins list in their `categories`.

    string
  • labelRequired

    Tab text for the category filter.

    string
MarketCoin9 fields
  • idRequired

    Unique coin id, used for the watchlist and row keys.

    string
  • symbolRequired

    Ticker shown under the name and used to pick the token icon.

    string
  • nameRequired

    Full coin name shown in the row.

    string
  • priceRequired

    Current price in USD.

    number
  • change24hRequired

    24h change in percent.

    number
  • marketCapRequired

    Market cap in USD; also sets the rank order.

    number
  • volume24hRequired

    Trading volume over the last 24 hours in USD.

    number
  • sparklineRequired

    Seven days of prices, oldest first.

    readonly number[]
  • categoriesRequired

    Category ids from `MarketCategory`.

    readonly string[]
MarketsLabels19 fields
  • titleRequired

    Section heading, also the section's accessible name.

    string
  • searchRequired

    Search field placeholder and accessible label.

    string
  • watchlistRequired

    Watchlist tab text, followed by the starred coin count.

    string
  • allRequired

    Tab text for showing every coin.

    string
  • rankRequired

    Rank column header.

    string
  • nameRequired

    Name column header.

    string
  • priceRequired

    Price column header.

    string
  • change24hRequired

    24h change column header.

    string
  • last7DaysRequired

    Sparkline column header.

    string
  • marketCapRequired

    Market cap column header.

    string
  • volume24hRequired

    24h volume column header.

    string
  • totalMarketCapRequired

    Summary label for the summed market cap.

    string
  • totalVolumeRequired

    Summary label for the summed 24h volume.

    string
  • topGainerRequired

    Summary label for the coin with the highest 24h change.

    string
  • addToWatchlistRequired

    Star button label for a coin not yet watched, given its name.

    (name: string) => string
  • removeFromWatchlistRequired

    Star button label for a watched coin, given its name.

    (name: string) => string
  • emptyWatchlistRequired

    Shown when the watchlist tab has no coins.

    string
  • emptySearchRequired

    Shown when no coins match the search or category.

    string
  • liveRequired

    Badge next to the title while the simulated feed runs.

    string

Order book

A live order book with springing depth bars, price grouping, a cumulative hover that shows the average fill price, and a trade tape that slides in new fills.

ETH/USDC

+2.41% · 24h

2,412.4

24h high
2,448.9
24h low
2,351.2
24h volume
184,220 ETH

Order book

Price USDCSize ETHCumulative total ETH
2,413.40.62436.534
2,413.31.74635.911
2,413.21.29234.164
2,413.10.77432.872
2,413.03.06632.098
2,412.93.84629.032
2,412.82.07625.187
2,412.72.43723.110
2,412.615.53220.673
2,412.52.7065.140
2,412.42.4352.435
Reference price: 2,412.4Spread 0.1 · 0.004%
Price USDCSize ETHCumulative total ETH
2,412.30.3570.357
2,412.21.4251.782
2,412.11.0142.796
2,412.04.3407.137
2,411.90.0907.227
2,411.80.9898.216
2,411.74.48512.701
2,411.62.17514.876
2,411.50.29915.175
2,411.42.99818.173
2,411.352.77970.952

Hover a level to see the cost of filling up to it

Simulated order flow for demonstration. Not market data.

"use client";

import { CryptoOrderBook } from "@/components/premium/crypto-markets";

export function CryptoOrderBookPreview() {
  return <CryptoOrderBook />;
}

Install

$ bunx --bun shadcn add @beui-pro/crypto-order-book

API Reference

Every prop is optional unless marked required. Data, copy, and colors default to the sample content.

CryptoOrderBook5 props
  • pair

    Market pair and 24h stats shown in the header. Defaults to ETH/USDC.

    OrderBookPair
  • labels

    Text overrides merged over the default English labels.

    Partial<OrderBookLabels>
  • rows

    Levels shown on each side.

    number

    Default 11

  • live

    Simulate order flow.

    boolean

    Default true

  • className

    Classes merged onto the root element.

    string
Types2 types

The object types these props take, field by field.

OrderBookPair9 fields
  • baseRequired

    Base asset symbol, such as ETH; sizes are in this unit.

    string
  • quoteRequired

    Quote asset symbol, such as USDC; prices are in this unit.

    string
  • tickSizeRequired

    Smallest price step of the raw book.

    number
  • priceRequired

    Starting best ask, in quote units.

    number
  • change24hRequired

    24h change in percent, shown under the pair name.

    number
  • high24hRequired

    Highest price in the last 24 hours, in quote units.

    number
  • low24hRequired

    Lowest price in the last 24 hours, in quote units.

    number
  • volume24hRequired

    24h volume in base units.

    number
  • sizeDecimalsRequired

    Fraction digits for base-unit sizes.

    number
OrderBookLabels14 fields
  • bookRequired

    Order book heading, tab text, and accessible name.

    string
  • tradesRequired

    Trades panel heading and tab text.

    string
  • priceRequired

    Trades table price header, given the quote symbol.

    (quote: string) => string
  • sizeRequired

    Trades table size header, given the base symbol.

    (base: string) => string
  • totalRequired

    Currently unused; the book header shows its own English text.

    (base: string) => string
  • timeRequired

    Trades table time column header.

    string
  • spreadRequired

    Currently unused; the spread row shows its own English text.

    string
  • groupingRequired

    Accessible label for the price grouping tabs.

    string
  • highRequired

    Header stat label for the 24h high.

    string
  • lowRequired

    Header stat label for the 24h low.

    string
  • volumeRequired

    Header stat label for the 24h volume.

    string
  • averageRequired

    Currently unused; the depth summary shows its own English text.

    string
  • sumRequired

    Currently unused; the depth summary shows its own English text.

    string
  • hoverHintRequired

    Footer hint shown until a book level is hovered.

    string

Perps positions

Open perpetual positions with live marks, rolling PnL and ROE, a liquidation cushion that changes color as risk grows, and a dialog to close, change leverage, or set take-profit and stop-loss.

Positions3

Equity
$18,442.18
Unrealized PnL
+$21.43
Margin used$6,811.68 · 37%

Available $11,630.50

  • BTC-PERPLong 10x

    TP 69,500.0 · SL —

    Size

    0.420 BTC

    $27,317.85

    Entry / Mark

    64,180.0

    65,042.5

    PnL (ROE)

    +$362.25

    +13.44%

    Liq. price

    58,082.9

    10.7%
  • ETH-PERPShort 5x

    TP — · SL 2,590.00

    Size

    6.50 ETH

    $15,807.03

    Entry / Mark

    2,468.40

    2,431.85

    PnL (ROE)

    +$237.58

    +7.40%

    Liq. price

    2,949.74

    21.3%
  • SOL-PERPLong 20x

    TP — · SL —

    Size

    120.0 SOL

    $17,565.60

    Entry / Mark

    151.20

    146.38

    PnL (ROE)

    −$578.40

    −63.76%

    Liq. price

    144.40

    1.4%

Simulated positions and prices for demonstration. No orders are placed.

"use client";

import { PerpsPositions } from "@/components/premium/crypto-markets";

export function PerpsPositionsPreview() {
  return <PerpsPositions />;
}

Install

$ bunx --bun shadcn add @beui-pro/perps-positions

API Reference

Every prop is optional unless marked required. Data, copy, and colors default to the sample content.

PerpsPositions8 props
  • positions

    Open positions on first render; later changes are ignored.

    readonly PerpPosition[]
  • balance

    Collateral balance in USD before unrealized PnL.

    number

    Default 18420.75

  • labels

    Text overrides merged over the default English labels.

    Partial<PerpsLabels>
  • live

    Simulate mark prices. Turn off when streaming marks through `positions`.

    boolean

    Default true

  • onClosePosition

    Each callback may return a promise; the UI waits for it to resolve.

    ((request: ClosePositionRequest) => unknown)
  • onSetLeverage

    Called with the position id and new leverage when leverage is confirmed.

    ((request: LeverageRequest) => unknown)
  • onSetTpSl

    Called with the position id and new TP and SL prices when saved.

    ((request: TpSlRequest) => unknown)
  • className

    Classes merged onto the root element.

    string
Types5 types

The object types these props take, field by field.

PerpPosition11 fields
  • idRequired

    Unique position id, passed back in every request.

    string
  • symbolRequired

    Base asset, such as "BTC".

    string
  • sideRequired

    Long or short, which sets the PnL and liquidation direction.

    PerpSide
  • sizeRequired

    Size in base units.

    number
  • entryRequired

    Average entry price in USD.

    number
  • leverageRequired

    Leverage multiple, from 1 to 50 in the manage dialog.

    number
  • markRequired

    Mark price; the live feed updates it.

    number
  • priceDecimalsRequired

    Decimals for prices of this market.

    number
  • sizeDecimalsRequired

    Decimals shown for this position's size.

    number
  • takeProfit

    Take-profit trigger price, or null when not set.

    number | null
  • stopLoss

    Stop-loss trigger price, or null when not set.

    number | null
ClosePositionRequest3 fields
  • idRequired

    Id of the position to close.

    string
  • fractionRequired

    Share of the position to close, from 0 to 1.

    number
  • priceRequired

    Mark price at the moment the close was confirmed.

    number
LeverageRequest2 fields
  • idRequired

    Id of the position to change.

    string
  • leverageRequired

    New leverage multiple chosen in the dialog.

    number
TpSlRequest3 fields
  • idRequired

    Id of the position to change.

    string
  • takeProfitRequired

    New take-profit price, or null to clear it.

    number | null
  • stopLossRequired

    New stop-loss price, or null to clear it.

    number | null
PerpsLabels21 fields
  • titleRequired

    Section heading and accessible name.

    string
  • equityRequired

    Account bar label for balance plus unrealized PnL.

    string
  • unrealizedRequired

    Account bar label for total open PnL.

    string
  • marginUsedRequired

    Account bar label for margin locked in open positions.

    string
  • availableRequired

    Label for equity left after margin used.

    string
  • marketRequired

    Market column header.

    string
  • sizeRequired

    Size column header and row label.

    string
  • entryMarkRequired

    Entry and mark price column header.

    string
  • pnlRequired

    PnL and return on equity column header.

    string
  • liquidationRequired

    Liquidation price column header and leverage panel label.

    string
  • manageRequired

    Row button text that opens the manage dialog.

    string
  • longRequired

    Side text for long positions in rows and the dialog title.

    string
  • shortRequired

    Side text for short positions in rows and the dialog title.

    string
  • emptyRequired

    Shown when no positions are open.

    string
  • closeRequired

    Manage dialog tab for closing a position.

    string
  • leverageRequired

    Manage dialog tab and slider label for leverage.

    string
  • tpslRequired

    Manage dialog tab for take-profit and stop-loss.

    string
  • takeProfitRequired

    Take-profit field label.

    string
  • stopLossRequired

    Stop-loss field label.

    string
  • confirmingRequired

    Button text while a change waits for confirmation.

    string
  • disclaimerRequired

    Small note shown under the positions table.

    string