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

Menu

Balloon

CrashBalloon.vue

Best cash out 0.00×

  • Recent rounds show here

Ready

1.00×

Start a round

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/crash-balloon

Import the shared styles once in your application.

TSUsage
import CrashBalloon from '@/components/beui/games/CrashBalloon.vue'
import '@/components/beui/styles.css'

API Reference

v-model:autoCashOut?
number | null

Multiplier to cash out at automatically (controlled), or null for manual play. Applies from the next round.

Default—
defaultAutoCashOut?
number | null

Initial auto cash-out when uncontrolled. Default null (off).

Default—
getCrashPoint?
() => number | Promise<number>

Decides each round's crash point, called once when the round starts. Return a number, or a Promise for one (a server round): the main button shows Starting… until it settles, and a rejection returns to Start. Ignored when `crashAt` is passed.

Default—
crashAt?
CrashReveal | null

Live rounds (controlled), for a server that keeps the crash point secret until it happens: the round `start` was given and its crash point once revealed, or null.

Default—
@start?
(round: number) => void

Called when the player starts a round, before its crash point is known, with the round's number (unique on the page).

Default—
@cash-out?
(multiplier: number) => void

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.

Default—
@crash?
(point: number, payout: number | null) => void

Called when the round crashes, with the cash-out multiplier or null if the player was still in.

Default—
v-model:sound?
boolean

Play synthesized sounds (controlled).

Defaultundefined
defaultSound?
boolean

Initial sound state when uncontrolled. Default false.

Default—
aria-label?
string

Accessible name for the game. Default "Crash".

Default—
labels?
Partial<CrashMessages>

Override built-in text for this instance.

Default—
class?
string
Default—
@auto-cash-out-change?
(value: number | null) => void
Default—
@sound-change?
(value: boolean) => void
Default—

Updated