Component packs › Baize › Cue Button

Cue Button

Hold to draw the cue back, let go to strike: the object ball is cut into the corner pocket and your action runs as it drops.

Cue Button is a button from Baize, a component pack with 6 billiards components: Controls played on a pool table: balls that roll, knock, bank off cushions and drop into pockets. Price: $2 for the whole pack.

Built with: hold for power, ghost-ball aim, rolling number spots.

Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.

Cue Button props

PropTypeDefaultDescription
labelstring
donestringShown after the ball drops.
action() => unknownRuns when the object ball drops into the pocket.
widthnumber340Width in px. Default 340.
darkboolean
autoplaynumber | falseShowcase mode: plays a shot every N ms while visible.

Methods on the ref

Use it in React

import CueButton from './CueButton';

<CueButton />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Baize

Good for: Skeuomorphic UI.