---
title: "Balloon Crash Game"
description: "Free React crash game: a hot air balloon climbs an altimeter as the multiplier rises, a parachutist bails at cash out, and a crash pops it. shadcn install."
category: "Casino"
parent: "https://beui.dev/casino/crash"
publishedAt: "2026-11-05"
updatedAt: "2026-11-25"
documentation: "https://beui.dev/casino/crash/balloon"
markdown: "https://beui.dev/casino/crash/balloon.md"
license: "MIT"
---

# Balloon Crash Game

> Free React crash game: a hot air balloon climbs an altimeter as the multiplier rises, a parachutist bails at cash out, and a crash pops it. shadcn install.

## Install

```bash
npx shadcn@latest add @beui/crash-balloon
```

## Dependencies

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

## Usage

### Balloon usage

A hot-air balloon climbs an altimeter: the tape and clouds scroll past as the multiplier rises, a parachutist bails at your cash out, and a crash pops the envelope.

```tsx
"use client";

import { useState } from "react";
import { CrashBalloon } from "@/components/motion/crash/crash-balloon";
import { formatMultiplier } from "@/components/motion/crash/use-crash-game";

export function CrashBalloonPreview() {
  const [best, setBest] = useState(0);

  return (
    <div className="flex w-full max-w-md flex-col items-center gap-3">
      <p className="text-sm text-muted-foreground tabular-nums">
        Best cash out <span className="font-medium text-foreground">{formatMultiplier(best)}</span>
      </p>
      <CrashBalloon onCashOut={(multiplier) => setBest((value) => Math.max(value, multiplier))} />
    </div>
  );
}
```

## API Reference

### CrashBalloon

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `autoCashOut` | `number \| null` | — | No | Multiplier to cash out at automatically (controlled), or null for manual play. Applies from the next round. |
| `defaultAutoCashOut` | `number \| null` | — | No | Initial auto cash-out when uncontrolled. Default null (off). |
| `onAutoCashOutChange` | `((autoCashOut: number \| null) => void)` | — | No | Called when the Auto menu changes between rounds. |
| `getCrashPoint` | `(() => number \| Promise<number>)` | — | No | Decides each round's crash point, called once when the round starts. Return a number, or a Promise for one (a server round, a provably fair hash): the main button shows Starting… until it settles, and a rejection returns to Start. Values below 1 or not finite become 1, and values are floored to two decimals. Default `crashPoint()`. Ignored when `crashAt` is passed. |
| `crashAt` | `CrashReveal \| null` | — | No | Live rounds (controlled), for a server that keeps the crash point secret until it happens: the round `onStart` was given and its crash point once revealed, or null. A round flies open-ended until its own crash point arrives; a value for any other round is ignored, so a reveal from last round can't end this one. A value at or below the current multiplier crashes at once, at that value, and a cash out above it never happened: the round ends lost and `onCashOut` is not called. A value still ahead means the display is behind the server: the flight runs out to it quickly and takes no more hand cash outs (an auto target below it still pays). Whether a round is live is fixed when it starts; dropping `crashAt` mid-round ends it at the current multiplier. |
| `onStart` | `((round: number) => void)` | — | No | Called when the player starts a round, before its crash point is known, with the round's number (unique on the page). |
| `onCashOut` | `((multiplier: number) => void)` | — | No | Called when the player cashes out, by hand or automatically. In a live round it waits until the crash point is revealed, so it only fires for a cash out that stands. |
| `onCrash` | `((crashPoint: number, cashedOut: number \| null) => void)` | — | No | Called when the round crashes, with the cash-out multiplier or null if the player was still in. |
| `sound` | `boolean` | — | No | Play synthesized sounds (controlled): a climbing chime at each milestone (2× to 5×, then 10×, 20×, 50×…), a cash-out arpeggio and a crash blast. |
| `defaultSound` | `boolean` | — | No | Initial sound state when uncontrolled. Default false. |
| `onSoundChange` | `((sound: boolean) => void)` | — | No | Called when the sound button is toggled. |
| `aria-label` | `string` | — | No | Accessible name for the game. Default "Crash". |
| `labels` | `Partial<{ region: string; recentCrashes: string; recentEmpty: string; sound: string; auto: string; autoOff: string; start: string; starting: string; cashOut: string; crashing: string; skip: string; waiting: string; ... 34 more ...; targetMarkTower: string; }>` | — | No | Override built-in text for this instance. |
| `className` | `string` | — | No | Classes merged onto the root element. |

## Types

### CrashReveal

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `round` | `number` | Yes | Round number from `onStart`; a reveal for any other round is ignored. |
| `value` | `number` | Yes | Multiplier the round crashes at, such as 2.5 for 2.5×. |

## More in Crash

- [Plane Crash Game](https://beui.dev/casino/crash/plane.md)
- [Tower Crash Game](https://beui.dev/casino/crash/tower.md)

## Source

- Registry detail: https://beui.dev/r/crash-balloon
- Raw source: https://beui.dev/r/crash-balloon/raw
- GitHub: https://github.com/starc007/ui-components
