feat: Update API
BREAKING CHANGE:
Each icon in the `feather.icons` object is now an `Icon` object with a `name`, `contents`, `tags` and `attrs` property.
```js
/* BEFORE */
feather.icons.x
// '<line ... /><line ... />'
/* AFTER */
feather.icons.x
// {
// name: 'x',
// contents: '<line ... /><line ... />`,
// tags: ['cancel', 'close', 'delete', 'remove'],
// attrs: {
// class: 'feather feather-x',
// xmlns: 'http://www.w3.org/2000/svg',
// width: 24,
// height: 24,
// viewBox: '0 0 24 24',
// fill: 'none',
// stroke: 'currentColor',
// 'stroke-width': 2,
// 'stroke-linecap': 'round',
// 'stroke-linejoin': 'round',
// }
// }
```
`feather.toSvg()` has been deprecated in favor of `feather.icons[name].toSvg()`:
```js
/* BEFORE */
feather.toSvg('x')
/* AFTER */
feather.icons.x.toSvg()
```
`feather.replace()` now copies all attributes on the placeholder element (i.e. `<i>`) to the `<svg>` tag instead of just `class` and `id`:
```html
<i data-feather="circle" id="my-circle" class="foo bar" stroke-width="1"></i>
<!--
<i> will be replaced with:
<svg id="my-circle" class="feather feather-circle foo bar" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle></svg>
-->
```
2017-11-19 07:00:16 +03:00
|
|
|
{
|
2017-12-22 09:14:05 +03:00
|
|
|
"activity": ["pulse", "health", "action", "motion"],
|
|
|
|
"airplay": ["stream", "cast", "mirroring"],
|
2017-12-14 13:01:19 +03:00
|
|
|
"alert-circle": ["warning"],
|
|
|
|
"alert-octagon": ["warning"],
|
|
|
|
"alert-triangle": ["warning"],
|
|
|
|
"at-sign": ["mention"],
|
2017-12-22 09:14:05 +03:00
|
|
|
"award": ["achievement", "badge"],
|
2017-12-14 13:01:19 +03:00
|
|
|
"aperture": ["camera", "photo"],
|
feat: Update API
BREAKING CHANGE:
Each icon in the `feather.icons` object is now an `Icon` object with a `name`, `contents`, `tags` and `attrs` property.
```js
/* BEFORE */
feather.icons.x
// '<line ... /><line ... />'
/* AFTER */
feather.icons.x
// {
// name: 'x',
// contents: '<line ... /><line ... />`,
// tags: ['cancel', 'close', 'delete', 'remove'],
// attrs: {
// class: 'feather feather-x',
// xmlns: 'http://www.w3.org/2000/svg',
// width: 24,
// height: 24,
// viewBox: '0 0 24 24',
// fill: 'none',
// stroke: 'currentColor',
// 'stroke-width': 2,
// 'stroke-linecap': 'round',
// 'stroke-linejoin': 'round',
// }
// }
```
`feather.toSvg()` has been deprecated in favor of `feather.icons[name].toSvg()`:
```js
/* BEFORE */
feather.toSvg('x')
/* AFTER */
feather.icons.x.toSvg()
```
`feather.replace()` now copies all attributes on the placeholder element (i.e. `<i>`) to the `<svg>` tag instead of just `class` and `id`:
```html
<i data-feather="circle" id="my-circle" class="foo bar" stroke-width="1"></i>
<!--
<i> will be replaced with:
<svg id="my-circle" class="feather feather-circle foo bar" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle></svg>
-->
```
2017-11-19 07:00:16 +03:00
|
|
|
"bell": ["alarm", "notification"],
|
2017-12-22 09:14:05 +03:00
|
|
|
"bell-off": ["alarm", "notification", "silent"],
|
2017-12-15 11:21:37 +03:00
|
|
|
"bluetooth": ["wireless"],
|
|
|
|
"book-open": ["read"],
|
2017-12-22 09:14:05 +03:00
|
|
|
"book": ["read", "dictionary", "booklet", "magazine"],
|
|
|
|
"bookmark": ["read", "clip", "marker", "tag"],
|
|
|
|
"briefcase": ["work", "bag", "baggage", "folder"],
|
2017-12-15 11:21:37 +03:00
|
|
|
"clipboard": ["copy"],
|
2017-12-22 09:14:05 +03:00
|
|
|
"clock": ["time", "watch", "alarm"],
|
|
|
|
"cloud-drizzle": ["weather", "shower"],
|
|
|
|
"cloud-lightning": ["weather", "bolt"],
|
2017-12-15 11:21:37 +03:00
|
|
|
"cloud-rain": ["weather"],
|
2017-12-22 09:14:05 +03:00
|
|
|
"cloud-snow": ["weather", "blizzard"],
|
2017-12-15 11:21:37 +03:00
|
|
|
"cloud": ["weather"],
|
|
|
|
"codepen": ["logo"],
|
2019-03-30 20:09:37 +03:00
|
|
|
"codesandbox": ["logo"],
|
2018-10-28 07:00:41 +03:00
|
|
|
"coffee": ["drink", "cup", "mug", "tea", "cafe", "hot", "beverage"],
|
2017-12-22 09:14:05 +03:00
|
|
|
"command": ["keyboard", "cmd"],
|
2017-12-15 11:21:37 +03:00
|
|
|
"compass": ["navigation", "safari", "travel"],
|
|
|
|
"copy": ["clone", "duplicate"],
|
|
|
|
"corner-down-left": ["arrow"],
|
|
|
|
"corner-down-right": ["arrow"],
|
|
|
|
"corner-left-down": ["arrow"],
|
|
|
|
"corner-left-up": ["arrow"],
|
|
|
|
"corner-right-down": ["arrow"],
|
|
|
|
"corner-right-up": ["arrow"],
|
|
|
|
"corner-up-left": ["arrow"],
|
|
|
|
"corner-up-right": ["arrow"],
|
2017-12-22 09:14:05 +03:00
|
|
|
"credit-card": ["purchase", "payment", "cc"],
|
|
|
|
"crop": ["photo", "image"],
|
2017-12-15 11:21:37 +03:00
|
|
|
"crosshair": ["aim", "target"],
|
2017-12-22 09:14:05 +03:00
|
|
|
"database": ["storage"],
|
|
|
|
"delete": ["remove"],
|
2017-12-15 11:21:37 +03:00
|
|
|
"disc": ["album", "cd", "dvd", "music"],
|
|
|
|
"dollar-sign": ["currency", "money", "payment"],
|
|
|
|
"droplet": ["water"],
|
2017-12-22 09:14:05 +03:00
|
|
|
"edit": ["pencil", "change"],
|
|
|
|
"edit-2": ["pencil", "change"],
|
|
|
|
"edit-3": ["pencil", "change"],
|
2017-12-14 13:01:19 +03:00
|
|
|
"eye": ["view", "watch"],
|
|
|
|
"eye-off": ["view", "watch"],
|
|
|
|
"external-link": ["outbound"],
|
2017-12-15 11:21:37 +03:00
|
|
|
"facebook": ["logo"],
|
2017-12-14 13:01:19 +03:00
|
|
|
"fast-forward": ["music"],
|
2019-02-26 09:29:30 +03:00
|
|
|
"figma": ["logo", "design", "tool"],
|
2017-12-14 13:01:19 +03:00
|
|
|
"film": ["movie", "video"],
|
|
|
|
"folder-minus": ["directory"],
|
|
|
|
"folder-plus": ["directory"],
|
2017-12-15 11:21:37 +03:00
|
|
|
"folder": ["directory"],
|
2019-06-06 19:14:24 +03:00
|
|
|
"framer": ["logo", "design", "tool"],
|
2018-12-23 12:47:02 +03:00
|
|
|
"frown": ["emoji", "face", "bad", "sad", "emotion"],
|
2018-03-02 09:37:32 +03:00
|
|
|
"gift": ["present", "box", "birthday", "party"],
|
2017-12-15 11:21:37 +03:00
|
|
|
"git-branch": ["code", "version control"],
|
|
|
|
"git-commit": ["code", "version control"],
|
|
|
|
"git-merge": ["code", "version control"],
|
|
|
|
"git-pull-request": ["code", "version control"],
|
|
|
|
"github": ["logo", "version control"],
|
|
|
|
"gitlab": ["logo", "version control"],
|
2017-12-14 13:01:19 +03:00
|
|
|
"global": ["world", "browser", "language", "translate"],
|
|
|
|
"hard-drive": ["computer", "server"],
|
|
|
|
"hash": ["hashtag", "number", "pound"],
|
2017-12-22 09:14:05 +03:00
|
|
|
"headphones": ["music", "audio"],
|
2017-12-14 13:01:19 +03:00
|
|
|
"heart": ["like", "love"],
|
|
|
|
"help-circle": ["question mark"],
|
2019-03-30 20:12:26 +03:00
|
|
|
"hexagon": ["shape", "node.js", "logo"],
|
2017-12-14 13:01:19 +03:00
|
|
|
"home": ["house"],
|
|
|
|
"image": ["picture"],
|
2017-12-15 11:21:37 +03:00
|
|
|
"inbox": ["email"],
|
|
|
|
"instagram": ["logo", "camera"],
|
2019-01-25 09:20:34 +03:00
|
|
|
"key": ["password", "login", "authentication"],
|
2017-12-22 09:14:05 +03:00
|
|
|
"life-bouy": ["help", "life ring", "support"],
|
2017-12-15 11:21:37 +03:00
|
|
|
"linkedin": ["logo"],
|
|
|
|
"lock": ["security", "password"],
|
2017-12-14 13:01:19 +03:00
|
|
|
"log-in": ["sign in", "arrow"],
|
|
|
|
"log-out": ["sign out", "arrow"],
|
|
|
|
"mail": ["email"],
|
2017-12-22 09:41:11 +03:00
|
|
|
"map-pin": ["location", "navigation", "travel", "marker"],
|
2017-12-14 13:01:19 +03:00
|
|
|
"map": ["location", "navigation", "travel"],
|
|
|
|
"maximize": ["fullscreen"],
|
|
|
|
"maximize-2": ["fullscreen", "arrows"],
|
2018-12-23 12:47:02 +03:00
|
|
|
"meh": ["emoji", "face", "neutral", "emotion"],
|
2017-12-14 13:01:19 +03:00
|
|
|
"menu": ["bars", "navigation", "hamburger"],
|
2017-12-22 09:14:05 +03:00
|
|
|
"message-circle": ["comment", "chat"],
|
|
|
|
"message-square": ["comment", "chat"],
|
2017-12-15 11:21:37 +03:00
|
|
|
"mic-off": ["record"],
|
|
|
|
"mic": ["record"],
|
2017-12-14 13:01:19 +03:00
|
|
|
"minimize": ["exit fullscreen"],
|
|
|
|
"minimize-2": ["exit fullscreen", "arrows"],
|
|
|
|
"monitor": ["tv"],
|
|
|
|
"moon": ["dark", "night"],
|
|
|
|
"more-horizontal": ["ellipsis"],
|
|
|
|
"more-vertical": ["ellipsis"],
|
2019-01-29 07:29:10 +03:00
|
|
|
"mouse-pointer": ["arrow", "cursor"],
|
2017-12-14 13:01:19 +03:00
|
|
|
"move": ["arrows"],
|
|
|
|
"navigation": ["location", "travel"],
|
|
|
|
"navigation-2": ["location", "travel"],
|
|
|
|
"octagon": ["stop"],
|
|
|
|
"package": ["box"],
|
|
|
|
"paperclip": ["attachment"],
|
|
|
|
"pause": ["music", "stop"],
|
|
|
|
"pause-circle": ["music", "stop"],
|
2019-01-29 21:14:03 +03:00
|
|
|
"pen-tool": ["vector", "drawing"],
|
2017-12-14 13:01:19 +03:00
|
|
|
"play": ["music", "start"],
|
|
|
|
"play-circle": ["music", "start"],
|
|
|
|
"plus": ["add", "new"],
|
|
|
|
"plus-circle": ["add", "new"],
|
|
|
|
"plus-square": ["add", "new"],
|
2017-12-15 11:21:37 +03:00
|
|
|
"pocket": ["logo", "save"],
|
|
|
|
"power": ["on", "off"],
|
2017-12-14 13:01:19 +03:00
|
|
|
"radio": ["signal"],
|
|
|
|
"rewind": ["music"],
|
2017-12-22 09:14:05 +03:00
|
|
|
"rss": ["feed", "subscribe"],
|
2017-12-14 13:01:19 +03:00
|
|
|
"save": ["floppy disk"],
|
2019-01-28 07:31:14 +03:00
|
|
|
"search": ["find", "magnifier", "magnifying glass"],
|
2017-12-15 11:21:37 +03:00
|
|
|
"send": ["message", "mail", "paper airplane"],
|
feat: Update API
BREAKING CHANGE:
Each icon in the `feather.icons` object is now an `Icon` object with a `name`, `contents`, `tags` and `attrs` property.
```js
/* BEFORE */
feather.icons.x
// '<line ... /><line ... />'
/* AFTER */
feather.icons.x
// {
// name: 'x',
// contents: '<line ... /><line ... />`,
// tags: ['cancel', 'close', 'delete', 'remove'],
// attrs: {
// class: 'feather feather-x',
// xmlns: 'http://www.w3.org/2000/svg',
// width: 24,
// height: 24,
// viewBox: '0 0 24 24',
// fill: 'none',
// stroke: 'currentColor',
// 'stroke-width': 2,
// 'stroke-linecap': 'round',
// 'stroke-linejoin': 'round',
// }
// }
```
`feather.toSvg()` has been deprecated in favor of `feather.icons[name].toSvg()`:
```js
/* BEFORE */
feather.toSvg('x')
/* AFTER */
feather.icons.x.toSvg()
```
`feather.replace()` now copies all attributes on the placeholder element (i.e. `<i>`) to the `<svg>` tag instead of just `class` and `id`:
```html
<i data-feather="circle" id="my-circle" class="foo bar" stroke-width="1"></i>
<!--
<i> will be replaced with:
<svg id="my-circle" class="feather feather-circle foo bar" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle></svg>
-->
```
2017-11-19 07:00:16 +03:00
|
|
|
"settings": ["cog", "edit", "gear", "preferences"],
|
2017-12-14 13:01:19 +03:00
|
|
|
"shield": ["security"],
|
|
|
|
"shield-off": ["security"],
|
2017-12-15 11:21:37 +03:00
|
|
|
"shopping-bag": ["ecommerce", "cart", "purchase", "store"],
|
|
|
|
"shopping-cart": ["ecommerce", "cart", "purchase", "store"],
|
2017-12-14 13:01:19 +03:00
|
|
|
"shuffle": ["music"],
|
|
|
|
"skip-back": ["music"],
|
|
|
|
"skip-forward": ["music"],
|
|
|
|
"slash": ["ban", "no"],
|
|
|
|
"sliders": ["settings", "controls"],
|
2018-12-23 12:47:02 +03:00
|
|
|
"smile": ["emoji", "face", "happy", "good", "emotion"],
|
2017-12-15 11:21:37 +03:00
|
|
|
"speaker": ["music"],
|
2017-12-14 13:01:19 +03:00
|
|
|
"star": ["bookmark", "favorite", "like"],
|
|
|
|
"sun": ["brightness", "weather", "light"],
|
|
|
|
"sunrise": ["weather"],
|
|
|
|
"sunset": ["weather"],
|
|
|
|
"tag": ["label"],
|
|
|
|
"target": ["bullseye"],
|
|
|
|
"terminal": ["code", "command line"],
|
2017-12-22 09:14:05 +03:00
|
|
|
"thumbs-down": ["dislike", "bad"],
|
|
|
|
"thumbs-up": ["like", "good"],
|
2017-12-15 11:21:37 +03:00
|
|
|
"toggle-left": ["on", "off", "switch"],
|
|
|
|
"toggle-right": ["on", "off", "switch"],
|
2017-12-14 13:01:19 +03:00
|
|
|
"trash": ["garbage", "delete", "remove"],
|
|
|
|
"trash-2": ["garbage", "delete", "remove"],
|
2017-12-15 11:21:37 +03:00
|
|
|
"triangle": ["delta"],
|
|
|
|
"truck": ["delivery", "van", "shipping"],
|
|
|
|
"twitter": ["logo"],
|
|
|
|
"umbrella": ["rain", "weather"],
|
|
|
|
"video-off": ["camera", "movie", "film"],
|
|
|
|
"video": ["camera", "movie", "film"],
|
2017-12-14 13:01:19 +03:00
|
|
|
"voicemail": ["phone"],
|
|
|
|
"volume": ["music", "sound", "mute"],
|
|
|
|
"volume-1": ["music", "sound"],
|
|
|
|
"volume-2": ["music", "sound"],
|
|
|
|
"volume-x": ["music", "sound", "mute"],
|
|
|
|
"watch": ["clock", "time"],
|
2017-12-22 09:14:05 +03:00
|
|
|
"wind": ["weather", "air"],
|
2017-12-15 11:21:37 +03:00
|
|
|
"x-circle": ["cancel", "close", "delete", "remove", "times"],
|
2019-02-26 09:35:05 +03:00
|
|
|
"x-octagon": ["delete", "stop", "alert", "warning", "times"],
|
2017-12-15 11:21:37 +03:00
|
|
|
"x-square": ["cancel", "close", "delete", "remove", "times"],
|
|
|
|
"x": ["cancel", "close", "delete", "remove", "times"],
|
2018-03-02 09:39:16 +03:00
|
|
|
"youtube": ["logo", "video", "play"],
|
2017-12-15 11:21:37 +03:00
|
|
|
"zap-off": ["flash", "camera", "lightning"],
|
|
|
|
"zap": ["flash", "camera", "lightning"]
|
feat: Update API
BREAKING CHANGE:
Each icon in the `feather.icons` object is now an `Icon` object with a `name`, `contents`, `tags` and `attrs` property.
```js
/* BEFORE */
feather.icons.x
// '<line ... /><line ... />'
/* AFTER */
feather.icons.x
// {
// name: 'x',
// contents: '<line ... /><line ... />`,
// tags: ['cancel', 'close', 'delete', 'remove'],
// attrs: {
// class: 'feather feather-x',
// xmlns: 'http://www.w3.org/2000/svg',
// width: 24,
// height: 24,
// viewBox: '0 0 24 24',
// fill: 'none',
// stroke: 'currentColor',
// 'stroke-width': 2,
// 'stroke-linecap': 'round',
// 'stroke-linejoin': 'round',
// }
// }
```
`feather.toSvg()` has been deprecated in favor of `feather.icons[name].toSvg()`:
```js
/* BEFORE */
feather.toSvg('x')
/* AFTER */
feather.icons.x.toSvg()
```
`feather.replace()` now copies all attributes on the placeholder element (i.e. `<i>`) to the `<svg>` tag instead of just `class` and `id`:
```html
<i data-feather="circle" id="my-circle" class="foo bar" stroke-width="1"></i>
<!--
<i> will be replaced with:
<svg id="my-circle" class="feather feather-circle foo bar" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle></svg>
-->
```
2017-11-19 07:00:16 +03:00
|
|
|
}
|