Package Exports
- vellum-random-table
- vellum-random-table/vellum-random-table.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-random-table) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
<vellum-random-table>
Web component for interactive random tables.
| Attribute | Description |
|---|---|
select |
CSS selector for the container/input to display results. |
Examples
Simple, one-column table (elements are selected at random with equal weight):
<vellum-random-table select="#result">
<caption>
Random Encounters
</caption>
<table>
<thead>
<tr>
<th>Encounter</th>
</tr>
</thead>
<tbody>
<tr>
<td>1 wolf</td>
</tr>
<tr>
<td>2 goblins</td>
</tr>
</tbody>
</table>
<button>Roll</button>
<input id="result" type="text" />
</vellum-random-table>Installation
Install via npm: npm i vellum-random-table -S.
Usage
Include the <script> in your project:
<script type="module" src="vellum-random-table.js"></script>