feeling-lucky

Open source · TypeScript · No runtime dependencies

A casino room for any web app

Give your users a prize wheel, roulette, a slot machine, pachinko, scratch cards, blackjack and Texas Hold'em. Every game awards the prizes you configure, and your app decides what winning means. One function, with React, Angular, Vue or plain HTML.

npm i @adiakys/feeling-lucky

In the room, Ctrl+Shift+L opens the developer menu: force a jackpot, switch themes and bonuses.

The games room lobby: scratch card, Grand Wheel, slot machine, roulette and pachinko tables under a marquee of lights

Seven games, one room

The main hall opens on five games; the Salon Privé, one swipe away, deals cards against the house. Every play draws its prize tier first, then the game stages it.

Drops into your app, stays out of its way

Get started

Install the package, describe your prizes and open the room from any button. The room grows out of the element you pass.

// npm install @adiakys/feeling-lucky
import { createFeelingLucky } from '@adiakys/feeling-lucky';

const lucky = createFeelingLucky({
  prizes: [
    {
      id: 'pro',
      name: 'Pro plan',
      icon: '/icons/pro.svg',
      variants: [
        { tier: 'small', label: '7 days', short: '7D' },
        { tier: 'big', label: '1 year', short: '1Y' },
      ],
    },
  ],
  onClaim: async (win) => redeem(win),
});

button.addEventListener('click', (event) =>
  lucky.open({ from: event.currentTarget }));