Component packs › Pips › Pick a Number

Pick a Number

A die is thrown to pick from your list; when it lands past the last choice it is rolled again.

Pick a Number is a random picker from Pips, a component pack with 6 dice controls: Controls built from dice that tumble, bounce and land the way dice do. Price: $2 for the whole pack.

Built with: face on top decides, re-roll rule, announced result.

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.

Pick a Number props

PropTypeDefaultDescription
optionsstring[]Up to six choices.
titlestringHeading above the list.
labelstring"Pick one"Button text. Default "Pick one".
disabledboolean
onPick(index: number, choice: string) => void
autoplaynumber | falseShowcase mode: picks every N ms while visible.
seednumber

Methods on the ref

Use it in React

import PickNumber from './PickNumber';

<PickNumber />

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

More in Pips

Good for: Skeuomorphic UI.