预测市场交易卡

预测市场交易面板,支持买入/卖出模式、结果价格展示、滚动数字输入、快捷金额芯片以及多种交易状态。

To win

Avg. Price 16.7¢

$688.62

安装

用 shadcn CLI 添加,或手动复制源码。

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

API 参考

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

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.