/css-roulette-spinner

A roulette style spinner built entirely using modern CSS, HTML, and JS.

Primary LanguageJavaScriptMIT LicenseMIT

css-roulette-spinner

A roulette style spinner built entirely using modern CSS, HTML, and JS.

No dependencies, no bs - 1 CSS file, 1 JS file

You create the spinner by:

var rouletteConfig = [
{name: "Basic", weight: 0.5, color: "Red"},
{name: "Rare", weight: 0.4, color: "Blue"},
{name: "Secret", weight: 0.1, color: "Green"},
];
var roulette = new Roulette(rouletteConfig);
document.body.appendChild(roulette.getElement());

A full example can be found in this html file.

The spinner looks like this

alt text