v1.1.1

TailwindCSS Required!

use with cdn

https://unpkg.com/balatrobutton@latest/dist/index.js
click to copy

NPM

npm install balatrobutton
click to copy

Quick Start:

import Balatro from "balatrobutton";
import "balatrobutton/style"; // required for styled font
const elementBtn = new Balatro();

// Available Options
const ElementBtn = new Balatro({
selector: '.className', // your element classes
power : () => 500, // flame power
score : 0, // Initial content
colorStart : "#f00", // Low power
colorMid : "#f50", // Medium power
colorEnd : "#ff0", // High power
});

Extra function :

// Get fire colors
console.log(elementBtn.getColors());
// Change power
elementBtn.setPower(5000);
// Change score
elementBtn.setScore(5000);
// Stop animation
elementBtn.stopAll();

CDN Usage :


import Balatro from "https://unpkg.com/balatrobutton@latest/dist/index.js"
import "https://unpkg.com/balatrobutton@latest/dist/style.css"

made with ❤️