shape-tri Make CSS Triangle Shape $ npm install shape-tri Options import {tri, dom} from "shape-tri"; tri({ strokeWidth: number | string, className?: string, container?: HTMLElement, fill?: string, direction?: string, stroke?: string }); dom(el: HTMLElement); How to Use <script src="//daybrush.github.io/shape-tri/release/latest/shapetri.min.js"></script> <div class="triangle" data-stroke-width="11px" style="width: 100px"></div> import {tri, dom} from "shape-tri"; const el = tri({radius: "100px", strokeWidth: "5px"}); document.body.appendChild(el); // data-stroke-width// data-stroke// data-fill// data-directiondom(document.querySelector(".triangle"));