Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/peteschaffner/framer-icon

Framer.js dynamically tinted icons based off of a template image.
https://github.com/peteschaffner/framer-icon

Last synced: 2 months ago
JSON representation

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

Awesome Lists containing this project

README

        

# Framer icon module



Dynamically tinted icons based off of a template image.

## Usage
```shell
$ cd .framer
$ npm install framer-icon
```

modules/myModule.coffee:
```coffeescript
exports.Icon = require "framer-icon"
```

app.coffee:
```coffeescript
{Icon} = require "myModule"

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

## API

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

[gradients]: https://developer.mozilla.org/en-US/docs/Web/CSS/gradient