JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 11
  • Score
    100M100P100Q44761F
  • License MIT

Web component and interactive dice roller.

Package Exports

  • vellum-dice
  • vellum-dice/vellum-dice.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vellum-dice) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

<vellum-dice> Lint

Web component and interactive dice roller. Inspired by javalent/dice-roller.

Demo

Attribute Description Default
animation Juice the roll with a flash of pre-rolls. false
hidedice Only display roll results. false

Examples

Add the following wherever you need a roll: <vellum-dice>2d6+3</vellum-dice>.

Add the animation attribute to animate the component: <vellum-dice animation>2d6+3</vellum-dice>.

Installation

You have a few options (choose one of these):

  1. Use the script directly via a 3rd party CDN.
  2. Install via npm: npm install vellum-dice.
  3. Download the source manually from GitHub into your project.

Usage

Include the <script> in your markup:

<script
  type="module"
  src="https://www.unpkg.com/vellum-dice@0.1.0/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>