avmaisak / ngx-simple-icons

Angular module for SimpleIcons.org - Over 2000 Free SVG icons for popular brands.
https://simpleicons.org
5 stars 0 forks source link
angular angular-icons brand-assets brand-colors brand-icons branding branding-assets brands company-brands design design-assets icon-pack icon-packs iconset logo logos svg svg-files svg-icons

Simple Icons

Angular Module for SimpleIcons

Over 2100 Free SVG icons for popular brands. See them all on one page at SimpleIcons.org. Contributions, corrections & requests can be made on GitHub.

Installation

npm i ngx-simple-icons --save

Usage

Import module

import { NgxSimpleIconsModule } from 'ngx-simple-icons';

Import needed icons

import { activision, adobexd } from 'ngx-simple-icons';

Use method pick for using selected icons

import { 
  NgxSimpleIconsModule, 
  activision,
  adobexd,
} from 'ngx-simple-icons';

@NgModule ({
  imports: [
    NgxSimpleIconsModule.pick({ activision, adobexd })
  ],
})
MyModule

Usage in component

<si icon="adobexd"></si>
<!-- use tag -->
<span si icon="adobexd"></span>

In component, you can use Enum or Type

import { IconNameEnum } from 'ngx-simple-icons';

public iconNames = IconNameEnum;
<si [icon]="iconNames.adobexd"></si>