Home

Awesome

Code moved to:
https://github.com/coreui/coreui-angular/tree/main/projects/coreui-icons-angular

<hr> <p align="center"> <a href="https://coreui.io/"> <img src="https://coreui.io/images/brand/coreui-signet.svg" alt="CoreUI logo" width="200" /> </a> </p> <h3 align="center">CoreUI Icons for Angular</h3> <p align="center"> <br> <a href="https://coreui.io/angular/docs/4.0/icons"><strong>Explore CoreUI for Angular docs »</strong></a> <br> <br> <a href="https://icons.coreui.io/"><strong>CoreUI Icons »</strong></a> <br> <br> <a href="https://github.com/coreui/coreui-icons-angular/issues/new?template=bug_report.md">Report a bug</a> · <a href="https://github.com/coreui/coreui-icons-angular/issues/new?template=feature_request.md">Request a feature</a> · <a href="https://blog.coreui.io/">Blog</a> </p>

CoreUI Icons Angular

angular angular npm-coreui-angular-next
NPM
Downloads License

cIcon directive

Angular directive for CoreUI Icons SVG set.

Features

For directive description visit https://coreui.io/angular/docs/4.0/

Installation

npm install @coreui/icons
npm install @coreui/icons-angular

Usage

// app NgModule

import { IconModule, IconSetService } from '@coreui/icons-angular';

@NgModule({
  imports: [
    IconModule,
...
  providers: [IconSetService],
...
// app component

import { cilEnvelopeOpen, flagSet } from '@coreui/icons';
import { IconSetService } from '@coreui/icons-angular';

@Component({
  ...
})
export class AppComponent implements OnInit {
  constructor(public iconSet: IconSetService) {
    // iconSet singleton
    iconSet.icons = { cilEnvelopeOpen, ...flagSet };
  }
...
<svg cIcon name="cil-envelope-open" size="lg"></svg>
<svg cIcon name="cifAu"></svg>

API

Icon directive

Use one of name or content prop as it defines the way of icon import

Inputs
proprertytypedefaultdescription
namestringundefinedname of SVG icon stored in IconSetService
contentstring, string[]undefinedSVG content
sizecustom, custom-size, sm, lg, xl, xxl, 3xl, 4xl, 5xl, 6xl, 7xl, 8xl, 9xl''Size of icon
titlestringundefined
customClassesstringundefinedOverwrites default .icon classes
viewBoxstringundefinedSVG viewbox
widthstringundefinedSVG width
heightstringundefinedSVG height

IconSet service

Props
proprertytypedefaultdescription
getIcon()(string): any[] returns an icon
iconsIIconSetundefinedIconSet object
iconNames[key: string]: stringundefinedreturns icon name from key

License

CoreUI Icons Free are free, open source, and GPL friendly. You can use it for commercial projects, open source projects, or really almost whatever you want.