icon-packs
TypeScript icon, indicating that this package has built-in type declarations

0.10.0 • Public • Published

icon-packs

Include icons from popular icon projects to your project. Icons are exported as ES2015 exports so only include the icons as you need, which reduces bundle size.

Installation

Icon-packs can by installed using npm or yarn.

npm install icon-packs --save
yarn add icon-packs

Usage

import { accountBookFill } from 'icons-packs/ant';
import { add } from 'icon-packs/blueprint';
import { alarmFill } from 'icon-packs/bootstrap';
import { accessibility1Line } from 'icon-packs/clarity';
import { add } from 'icon-packs/cssgg';
import { android } from 'icon-packs/devicons';
import { _500Px } from 'icon-packs/fa';
import { activity } from 'icon-packs/feather';
import { _3DHammer } from 'icon-packs/game';
import { iosAdd } from 'icon-packs/ionicons';
import { alarmClock } from 'icon-packs/jam';
import { accessibleIcon } from 'icon-packs/la';
import { _3DRotation24 } from 'icon-packs/material';
import { alert } from 'icon-packs/octicons';
import { _4KFill } from 'icon-packs/remix';
import { aboutMe } from 'icon-packs/simple';
import { adjustBrightness } from 'icon-packs/typicons';
import { wiAlien } from 'icon-packs/weather';

// render your icons with preferred framework

Format

Icons are formatted as plain objects and can be used with any framework:

{
  tag: 'svg',
  attrs: {
    xmlns: 'http://www.w3.org/2000/svg',
    viewBox: `0 0 24 24`
  },
  children: [{
    tag: 'desc',
    attrs: {},
    children: 'Icon Description'
  }, {
    tag: 'path',
    attrs: {
      x1: 0,
      y1: 0,
      x2: 23,
      y: 24
    }
  }]
}

API

All packs export:

  • VERSION - current version of icon pack
  • allIconNames - array of all available icon names in current icon pack

Icons with reserved filenames like delete or export are postfixed with an underscore: delete_ or export_.

Icons starting with a number like 4K are prefixed with an underscore: _4K.

Icon Packs exports all icons as es6 modules to enable tree shaking by default in most bundlers. Some environments only work with CommonJS. Icon Packs also exports icons in CommonJS format in the cjs directory: e.g. import { activity } from 'icon-packs/cjs/feather

Icons

License

The icon-packs package is available with the MIT license. Different icon projects come with different lisences be sure to check the lisence for used icons.

Readme

Keywords

none

Package Sidebar

Install

npm i icon-packs

Weekly Downloads

43

Version

0.10.0

License

MIT

Unpacked Size

74.5 MB

Total Files

158

Last publish

Collaborators

  • barry127