---
title: "Prediction Market Cards"
description: "Free React prediction market cards: outcome rows, odds buttons that roll to Yes and No on hover, payout multipliers, bookmarks and live price changes. shadcn."
category: "Blocks"
parent: "https://beui.dev/components/blocks/prediction-market"
publishedAt: "2026-06-18"
updatedAt: "2026-11-25"
documentation: "https://beui.dev/components/blocks/prediction-market/market-cards"
markdown: "https://beui.dev/components/blocks/prediction-market/market-cards.md"
license: "MIT"
---

# Prediction Market Cards

> Free React prediction market cards: outcome rows, odds buttons that roll to Yes and No on hover, payout multipliers, bookmarks and live price changes. shadcn.

## Install

```bash
npx shadcn@latest add @beui/prediction-market-card
```

## Dependencies

- `@floating-ui/dom`
- `clsx`
- `lucide-react`
- `motion`
- `react`
- `react-dom`
- `tailwind-merge`

## Usage

### Market Cards usage

Compact market listings with consistent outcome rows, animated odds CTAs, payout multipliers and bookmarks. Odds CTAs use green/red backgrounds and roll into Yes/No labels on hover or keyboard focus. Use Update odds to preview animated price changes.

```tsx
"use client";

import {
  PredictionMarketCard,
  type PredictionMarketCardSelection,
} from "@/components/motion/prediction-market-card";

export function PredictionMarketCardUsage({
  onTrade,
}: {
  onTrade: (selection: PredictionMarketCardSelection) => void;
}) {
  return (
    <PredictionMarketCard
      title="Boston Celtics vs. Los Angeles Lakers"
      category="Basketball"
      status="Sunday · 7:30 PM"
      volume="$2.4M"
      volumeHistory={[12, 18, 15, 26, 20, 32, 29, 38]}
      outcomes={[
        { id: "celtics", label: "Celtics", probability: 0.51, color: "#34d399" },
        { id: "lakers", label: "Lakers", probability: 0.49, color: "#fbbf24" },
      ]}
      onOutcomeClick={onTrade}
    />
  );
}
```

## API Reference

### PredictionMarketCard

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `title` | `string` | — | Yes | Market question shown as the card heading. |
| `icon` | `ReactNode` | — | No | Image or icon shown in a round frame beside the title. |
| `category` | `string` | — | No | Category label shown under the title, after the status. |
| `volume` | `string` | — | Yes | Preformatted trading volume shown in the footer, e.g. "$2.4M". |
| `volumeHistory` | `number[]` | — | No | Chronological volume samples for the optional footer sparkline. |
| `status` | `string` | — | No | A scheduled time or live match status. |
| `live` | `boolean` | `false` | No | Show the status in red with a dot, for a match in progress. Default: false |
| `outcomes` | `PredictionMarketCardOutcome[]` | — | Yes | Outcomes listed with their probability, payout and trade button. |
| `onOutcomeClick` | `((value: PredictionMarketCardSelection) => void)` | — | No | Called on each outcome CTA click; the card keeps no selected state. |
| `bookmarked` | `boolean` | — | No | Whether the market is bookmarked, for controlled use. |
| `defaultBookmarked` | `boolean` | `false` | No | The initial bookmark state when uncontrolled. Default: false |
| `onBookmarkChange` | `((bookmarked: boolean) => void)` | — | No | Called with the new state when the bookmark button is pressed. |
| `labels` | `Partial<{ payoutHint: string; payoutFor: string; volume: string; bookmark: string; trade: string; percent: string; yes: string; no: string; }>` | — | No | Override any built-in string. |
| `className` | `string` | — | No | Classes merged onto the root element. |

## Types

### PredictionMarketCardOutcome

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | Yes | Unique key, sent back as `outcomeId` when the outcome is picked. |
| `label` | `string` | Yes | Outcome name shown in the row and the trade button's accessible name. |
| `probability` | `number` | Yes | Probability between 0 and 1. |
| `icon` | `ReactNode` | No | Image or icon shown in a round frame before the label. |
| `color` | `string` | No | Optional team color for the compact probability line. |

### PredictionMarketCardSelection

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `outcomeId` | `string` | Yes | The `id` of the outcome that was picked. |
| `side` | `"yes" \| "no"` | Yes | The side picked. The card's outcome buttons always send "yes". |

## More in Prediction Market

- [Prediction Market Trade Ticket](https://beui.dev/components/blocks/prediction-market/trade-ticket.md)

## Source

- Registry detail: https://beui.dev/r/prediction-market-card
- Raw source: https://beui.dev/r/prediction-market-card/raw
- GitHub: https://github.com/starc007/ui-components
