peteschaffner / framer-icon

Framer.js dynamically tinted icons based off of a template image.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Framer icon module

Dynamically tinted icons based off of a template image.

Usage

$ cd <myProject>.framer
$ npm install framer-icon

modules/myModule.coffee:

exports.Icon = require "framer-icon"

app.coffee:

{Icon} = require "myModule"

new Icon
  width: 30
  height: 30
  image: "images/icon.png"
  tintColor: "cornflowerblue"

API

Icon#tintColor <string>

Get or set the tint color. Anything accepted by Layer#backgroundColor is valid, with the addition of CSS gradients. Icon#color and Icon#backgroundColor are aliases.

About

Framer.js dynamically tinted icons based off of a template image.


Languages

Language:JavaScript 99.0%Language:CSS 0.7%Language:HTML 0.2%Language:CoffeeScript 0.1%