shapes.js

1.0.1 • Public • Published

shapes.js

logo

stable

A creator for div with different shapes!

var Shapes = require('shapes.js');

var shapes = new Shapes();

//Creating a Triangle
var triangle = shapes.triangle({color: '#000333', size:'100px'});  
document.body.appendChild(triangle)  
  
//Creating a Square  
var square = shapes.square({color: '#0000ff', size:'100px', border:{width:'100px', color:'#ff0000', style: 'solid'}});  
document.body.appendChild(square)  

//Creating a Circle...
var circle = shapes.circle({color: '#000333', size:'100px', border:{width:'100px', color:'#ff0000', style: 'solid'}});
document.body.appendChild(circle)  
  
  
//NOTE: All options are optional, except for the size.

Future stuff...

I´m going to add rotation for all shapes!
... and maybe came with new shapes :)

Usage

NPM

Package Sidebar

Install

npm i shapes.js

Weekly Downloads

1

Version

1.0.1

License

MIT

Last publish

Collaborators

  • mbfassnacht