What you get
- 8 to 16 rows, three risk levels. Your attributes set where it starts; visitors can switch both in the game.
- One ball, or 5 or 10 at once. Turbo for speed, and autoplay that stops on a profit target, a loss limit or a big win.
- It feels finished. Pegs light up and ping as the ball passes, big wins get a celebration, and the sound is made in the browser with no audio files.
- Keyboard and accessibility. Space or Enter drops,
Mmutes,Tis turbo. Reduced motion is respected. - Small. About 14 KB for the shared core plus 4 KB for Plinko, compressed. No dependencies.
Plinko's own options
| Attribute | What it does |
|---|---|
rows | 8 to 16. Starts at 12. |
risk | low, medium or high. Starts at medium. Higher risk pays more at the edges and less in the middle. |
Options every game takes
| Attribute | What it does |
|---|---|
bet | The bet a visitor starts with (10 unless you say otherwise). |
accent | Any CSS colour, for the buttons and highlights. |
theme="light" | A light card for light pages. Dark is the default. |
label | Your own title above the game. |
currency · icon | What you call the play money, and an emoji or image URL shown beside it. |
sound="muted" | Starts silent and keeps the speaker button. sound="off" removes sound altogether. |
no-footer | Hides the small "chiplets" link under the game. |
Settings for the whole site (starting balance, largest bet, the wallet's name) go on the script tag, and CSS custom properties cover everything else. Both are in the docs.
Make it look like yours
A few attributes change the colour, the title and the currency. This one is live:
<chip-plinko rows="16" risk="high" accent="#22c55e" label="Lucky drop" currency="Points" icon="⭐"></chip-plinko>
The playground builds a snippet like this for you while you watch it change.
React to what happens
Every finished round fires an event that bubbles up to document, so your page can answer a win with confetti, a badge, or points of its own.
document.addEventListener('chiplets:win', (e) => {
// e.detail = { game, bet, payout, profit, multiplier, balance, ... }
if (e.detail.multiplier >= 10) celebrate();
});
Chiplets.wallet.give(500); // reward a visitor with play money
Chiplets.wallet.take(50); // let them spend it on something of yours
There are also chiplets:lose, chiplets:result, chiplets:balance and chiplets:auto. The full list is in the docs.
Works with the site you have
| Your site | How |
|---|---|
| Plain HTML | Paste the two lines anywhere in the page. |
| WordPress | Paste them into a Custom HTML block. |
| React, Vue, Astro | Load the script once, then render the tag like any other element. These are standard custom elements. |
| Your own server | Build the files from the source and serve them yourself. Nothing calls home. |
The odds, published
These numbers are computed from the same tables the game uses, so they can't drift from what visitors play.
| Risk | 8 rows | 12 rows | 16 rows |
|---|---|---|---|
| Low | edges 2.68× middle 0.75× · returns 98.9% | edges 3.30× middle 0.77× · returns 98.8% | edges 3.96× middle 0.79× · returns 98.9% |
| Medium | edges 8.37× middle 0.56× · returns 98.9% | edges 13.6× middle 0.63× · returns 98.8% | edges 20.5× middle 0.68× · returns 99.0% |
| High | edges 37.6× middle 0.26× · returns 99.0% | edges 111× middle 0.42× · returns 99.0% | edges 256× middle 0.52× · returns 99.0% |
The ball goes left or right at every row with even odds, so landing in a far edge with 16 rows is 1 in 65,536. Rounded multipliers are tuned so each board returns just under 99%.
Questions
Is the ball's path real, or decided in advance?
Each row is a fair left-or-right draw, made the moment the ball drops. The animation then follows that path to the bucket. Nothing nudges the ball, and effects never change a result.
Can I fix the rows and risk so visitors can't change them?
Not today. The attributes set the starting board and visitors can change it. If you need a locked board, open an issue and say what for.
Is it really free?
Yes. It's open source under the MIT licence, with no account, no API key and no paid tier. The source is on GitHub.
Is this gambling?
No money goes in and none comes out. Chiplets is play money only: there is no way to buy the currency, cash it out or win a prize, and that is on purpose. If you connect a game to real money or prizes yourself, gambling laws apply to you. The games are casino-style and meant for adult audiences.
Will it slow my page down?
The shared core is about 14 KB compressed and each game 3 to 5 KB, loaded with defer and only when a page uses the tag. There are no dependencies, fonts, images or audio files. Each game reserves its height while it loads, so the page doesn't jump.
Does it track my visitors?
No. The script requests its own files and nothing else: no analytics, no cookies. A visitor's balance is kept in their own browser.
Can visitors cheat?
Yes. The balance lives in their browser, so anyone with developer tools can change it. That's fine for play money. Don't attach anything of value to it.
Can I lock the version, or check the file?
Yes. Every release stays online unchanged at its own address, and each file has a published integrity hash. The README shows how to pin a version, verify it, or rebuild it yourself.
More games
Put several on one site and they share one play-money balance.
Build a snippet in the playground, read the docs, or see all four carry a whole site at chiplets.win.