Prediction Market

Market Cards

prediction-market-card.tsx

On the radar

Demo markets · simulated prices

Boston Celtics vs. Los Angeles Lakers

Sunday · 7:30 PMBasketball

Celtics
Lakers
$2.4M vol.

Tampa Bay Rays vs. Atlanta Braves

Mid 6thMLB

Rays
Braves
$458K vol.

Where will interest rates land by the end of the year?

Dec 31Economics

Below 3.5%
Above 4.0%
$347K vol.

Install

$ bunx --bun shadcn add @beui/prediction-market-card

API Reference

title
string
Default—
icon?
ReactNode
Default—
category?
string
Default—
volume
string
Default—
volumeHistory?
number[]

Chronological volume samples for the optional footer sparkline.

Default—
status?
string

A scheduled time or live match status.

Default—
live?
boolean
Defaultfalse
outcomes
PredictionMarketCardOutcome[]
Default—
onOutcomeClick?
((value: PredictionMarketCardSelection) => void)

Called on each outcome CTA click; the card keeps no selected state.

Default—
bookmarked?
boolean
Default—
defaultBookmarked?
boolean
Defaultfalse
onBookmarkChange?
((bookmarked: boolean) => void)
Default—
className?
string
Default—

Trade Ticket

prediction-market.tsx
To win

Avg. Price 16.7¢

$688.62

Install

$ bunx --bun shadcn add @beui/prediction-market

API Reference

outcomes?
PredictionMarketOutcome[]
Default[ { id: "up", label: "Up", price: 0.09 }, { id: "down", label: "Down", price: 0.91 }, ]
value?
PredictionMarketOrderValue
Default—
defaultValue?
Partial<PredictionMarketOrderValue>
Default—
onValueChange?
((value: PredictionMarketOrderValue) => void)
Default—
onTrade?
((order: PredictionMarketOrderValue, quote: PredictionMarketQuote) => void)
Default—
onSignIn?
(() => void)
Default—
authenticated?
boolean
Defaulttrue
orderTypeLabel?
string
DefaultMarket
balance?
number
Default500
positions?
Record<string, number>
Default{ up: 24, down: 16 }
quickAmounts?
number[]
Default[10, 50, 100, 500]
minTrade?
number
Default1
className?
string
Default—
classNames?
PredictionMarketClassNames
Default—

Keep in mind

Some components on this site are inspired by or recreated from existing work across the web. I'm not here to take credit; just to learn, experiment, and sometimes push things a bit further. If something looks familiar and I forgot to mention you, reach out and I'll fix that right away.

Updated