Slot Machine

GamesNode ScriptingFree

Pull the lever or hit Spin. Three reels, a near miss, a jackpot.

← PrevNext →
Live
Hit Spin or pull the lever

Get the file

Runtime

.riv

Ready to use in your app or website.

Free

Editable

.rev

Open it in the Rive editor and change anything.

Learn to build it

Full access

Build this yourself, step by step. Every .rev in the library is included.

Courses from $119

Own a course? Sign in and every .rev is yours.

Use it on your site

import { useRive } from '@rive-app/react-canvas';

export function SlotMachine() {
  const { rive, RiveComponent } = useRive({
    src: '/slot-machine.riv',
    artboard: 'Slot Machine',
    stateMachines: 'State Machine',
    autoplay: true,
    autoBind: true,
  });

  // every input on this page is a view model property
  const vm = rive?.viewModelInstance;
  if (vm) vm.trigger('spin').trigger();

  return <RiveComponent style={{ width: '100%', height: 400 }} />;
}

Inputs: spin, winChance, color1, color2, color3, color4, color5, leafColor, cabinetColor, signColor, accentColor, buttonColor, buttonTextColor, reelColor, winBandColor, titleColor, title, winText, buttonText. All on the SlotMachine view model.

More games

See all →