Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

dat-elements

1.1.0 • Public • Published

dat-elements stability

npm version build status downloads js-standard-style

Dat UI elements.

Usage

var Loader = require('dat-elements/loader')
var Sprite = require('dat-elements/sprite')
var Icon = require('dat-elements/icon')
 
// load the SVG sprite containing all icons onto the DOM
var sprite = Sprite()
document.body.appendChild(sprite)
 
// select an icon from the sprite!
var icon = Icon('happy-dat')
document.body.appendChild(icon)
 
// create a loader element
var loader = Loader()
document.body.appendChild(loader)

API

loader = Loader()

Create a smooth, pulsating loader.

sprite = Sprite()

Create a new SVG sprite that must be loaded onto the DOM as the first child element. Allows the icon element to work.

icon = Icon(iconName, [options])

Create a new icon element, referencing an icon from the sprite.

Installation

$ npm install dat-elements

See Also

License

MIT

install

npm i dat-elements

Downloadsweekly downloads

5

version

1.1.0

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
Report a vulnerability