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.
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.
-
Bonus of the dayOne main-hall game a day gets its own variant and boosted odds, the same for everyone.
Dealers on shiftThree shifts a day at the card tables, when hands win twice as often. Bring your own dealers.
SeasonsChristmas, Halloween, Easter and August dress the room, from the calendar.
Drops into your app, stays out of its way
Any framework
One entry point for React, Angular, Vue, Svelte or plain HTML. ESM for bundlers, an IIFE build for a script tag.
Isolated
The room lives in a shadow root mounted on
body: your CSS never reaches it and its CSS never leaks out.Your prizes, your odds
Plans, credits, coupons, merch: prizes come with small, big and jackpot variants, and you choose how often each tier wins.
Your claim flow
onWinandonClaimhand the win to your app, typed with your own fields. No signing or issuing in the library.Five languages
English, Italian, Spanish, French and German, following the page's language. Add more or override any text.
Multiplayer tables
Blackjack and Hold'em at shared tables of five, dealt by an ASP.NET Core server from NuGet or a ready-made container.
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 }));