shape-tri
TypeScript icon, indicating that this package has built-in type declarations

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"));

Readme

Keywords

Package Sidebar

Install

npm i shape-tri

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

51.8 kB

Total Files

22

Last publish

Collaborators

  • younkue