Get unlimited public & private packages + team-based management with npm Teams.Learn more »

shape-tri

0.1.0 • Public • Published

shape-tri npm version

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(elHTMLElement);

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-direction
dom(document.querySelector(".triangle"));

Install

npm i shape-tri

DownloadsWeekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

51.8 kB

Total Files

22

Last publish

Collaborators

  • avatar