Skip to content
↑↓ to navigate↵ to openesc to close

Menu

Prediction Market

Market Cards

PredictionMarketCard.vue

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

Run it in a project set up with shadcn-vue. The source is copied to components/beui and its dependencies are added to your package.json. Read the shadcn-vue guide

bunx --bun shadcn-vue@latest add @beui-vue/prediction-market-card

Import the shared styles once in your application.

TSUsage
import PredictionMarketCard from '@/components/beui/blocks/PredictionMarketCard.vue'
import '@/components/beui/styles.css'

API Reference

title
string
Default—
#icon?
slot

Round mark in the header.

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[]

Probability is between 0 and 1; `color` tints the compact probability line.

Default—
@outcome-click?
(selection: PredictionMarketCardSelection) => void

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

Default—
v-model:bookmarked?
boolean
Defaultundefined
defaultBookmarked?
boolean
Defaultfalse
@bookmark-change?
(value: boolean) => void
Default—
labels?
Partial<typeof predictionMarketCardMessages>

Override any built-in string.

Default—
className?
string
Default—
#outcome-icon?
{ outcome: PredictionMarketCardOutcome }

Round mark beside an outcome.

Default—

Trade Ticket

PredictionMarket.vue

Install

Run it in a project set up with shadcn-vue. The source is copied to components/beui and its dependencies are added to your package.json. Read the shadcn-vue guide

bunx --bun shadcn-vue@latest add @beui-vue/prediction-market

Import the shared styles once in your application.

TSUsage
import PredictionMarket from '@/components/beui/blocks/PredictionMarket.vue'
import '@/components/beui/styles.css'

API Reference

outcomes?
PredictionMarketOutcome[]
Default[{ id: "up", label: "Up", price: 0.09 }, { id: "down", label: "Down", price: 0.91 }]
value?
PredictionMarketOrderValue

Alias of `modelValue`, kept from the original port.

Default—
defaultValue?
Partial<PredictionMarketOrderValue>
Default—
@update:model-value?
(value: PredictionMarketOrderValue) => void
Default—
@trade?
(order: PredictionMarketOrderValue, quote: PredictionMarketQuote) => void
Default—
@sign-in?
() => void
Default—
authenticated?
boolean
Defaulttrue
orderTypeLabel?
string
Default—
balance?
number
Default500
positions?
Record<string, number>
Default{ up: 24, down: 16 }
quickAmounts?
number[]
Default[10, 50, 100, 500]
minTrade?
number
Default1
labels?
Partial<typeof predictionMarketMessages>

Override any built-in string. `{price}` fills `avgPrice`, `{amount}` fills `minimum`.

Default—
className?
string
Default—
classNames?
PredictionMarketClassNames
Default—
v-model?
PredictionMarketOrderValue
Default—
@value-change?
(value: PredictionMarketOrderValue) => void
Default—

Updated