This is a dice roller web component. I created this mainly for use with playing table top role playing games online. This can be used just as a simple web dice roller or incorporated into interactive rule books or character sheets.
Usage
Install the dice-roller.js script and add the <dice-roller></dice-roller>
to your html. Clicking on the dice makes them roll. You can change
the dice and how they are totaled using the attributes. The component can be styled using css variables (I have plans for more styling later). More detailed
instructions TBD.
Attributes
- dice: string comma separated list of dice to roll (i.e.,"6,8,10,6")
- total: how the total is arrived at
- modifier: + or - after dice are rolled
- bonus-die: additional die added after dice are summed up
- difficulty: number required for success
- size: visual size of dice