vellum-dice
v0.1.0
Published
Web component and interactive dice roller.
Downloads
13
Maintainers
Readme
<vellum-dice>
Web component and interactive dice roller. Inspired by javalent/dice-roller.
| Attribute | Description | Default |
| ----------- | ----------------------------------------- | ------- |
| animation
| Juice the roll with a flash of pre-rolls. | false
|
Examples
Add the following wherever you need a roll: <vellum-dice>2d6+3</vellum-dice>
.
Installation
You have a few options (choose one of these):
- Use the script directly via a 3rd party CDN.
- Install via npm:
npm install vellum-dice
. - Download the source manually from GitHub into your project.
Usage
Include the <script>
in your markup:
<script
type="module"
src="https://www.unpkg.com/[email protected]/vellum-dice.js"
></script>
<p>You have <vellum-dice> 3d6+3 </vellum-dice> Strength.</p>
If you host the script as part of your project:
<script type="module" src="vellum-dice.js"></script>