0.1.0 • Published 6 years ago

shape-tri v0.1.0

Weekly downloads
5
License
MIT
Repository
github
Last release
6 years ago

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