Create dice: D20, D12, D10, D8, D6, D4. Easily usable die as a native webcomponent in any framework or even without!
npm install die-3dThe code is optimized to lazy-load only the die you request. If you use the D10, the D20, D12 and other dice code are not fetched by the browser.
If you use a JS framework:
import 'die-3d';
If you use plain HTML:
All options:
max="20"
value="1"
color-bg-even="#333333"
color-bg-odd="rgba(70,70,70,0.8)"
color-value="goldenrod"
rolls="1"
time="3"
disabled
color-bg-even-disabled="rgba(103,63,0,0.9)"
color-bg-odd-disabled="rgba(103,63,0,0.8)"
color-value-disabled="#000"
contrast-active="500%"
>