Slot machine

Three reels that are real cylinders. They roll to a random symbol one after another, and you get a callback with the result.

Install it the shadcn way: copy the source file into your project. It uses CSS 3D, Tailwind CSS v4 and Framer Motion, no WebGL.

SlotMachine3D props

PropTypeDefaultDescription
symbolsstring[]DEFAULTSymbols that appear on each reel.
reelsnumber3Number of reels.
itemHeightnumber64Height of one symbol in px.
onResult(result: string[], won: boolean) => voidCalled after a spin with the final symbols and whether all of them match.
classNamestringExtra classes added to the outer element.

More components

Guides

Start

Cards

Scenes

Controls & text

Buttons

More cards

UI elements

Form controls

App components

Text & backgrounds

Showpieces

Blocks