Gathering detailed insights and metrics for @ant-design/icons-angular
Gathering detailed insights and metrics for @ant-design/icons-angular
npm install @ant-design/icons-angular
Typescript
Module System
Node Version
NPM Version
96.1
Supply Chain
97.2
Quality
84
Maintenance
100
Vulnerability
98.9
License
TypeScript (99.03%)
JavaScript (0.84%)
Less (0.06%)
HTML (0.04%)
Shell (0.02%)
CSS (0.01%)
EJS (0.01%)
Total Downloads
13,891,312
Last Day
15,342
Last Week
63,428
Last Month
288,049
Last Year
3,630,636
974 Stars
678 Commits
587 Forks
41 Watching
14 Branches
79 Contributors
Minified
Minified + Gzipped
Latest Version
19.0.0
Package Id
@ant-design/icons-angular@19.0.0
Unpacked Size
3.00 MB
Size
699.43 kB
File Count
2,516
NPM Version
10.2.4
Node Version
20.11.1
Publised On
25 Nov 2024
Cumulative downloads
Total Downloads
Last day
0.3%
15,342
Compared to previous day
Last week
-18.1%
63,428
Compared to previous week
Last month
2%
288,049
Compared to previous month
Last year
17%
3,630,636
Compared to previous year
2
4
1ng add @ant-design/icons-angular 2 3# or npm install @ant-design/icons-angular
You should import IconDirective
in your component.
1import { IconDirective } from '@ant-design/icons-angular'; 2 3@Component({ 4 imports: [ IconDirective ] 5}) 6export class AppComponent {}
And register the icons that you need to IconService
(all or explicitly, we call it static loading):
ATTENTION! We strongly suggest you not to register all icons. That would increase your bundle's size dramatically.
1import { Component } from '@angular/core'; 2import { IconService } from '@ant-design/icons-angular'; 3import { AccountBookFill } from '@ant-design/icons-angular/icons' 4// import * as AllIcons from 'ant-icons-angular/icons'; 5 6@Component({ 7 // ... 8}) 9export class AppComponent { 10 constructor(private _iconService: IconService) { 11 // Import all. NOT RECOMMENDED. ❌ 12 // const antDesignIcons = AllIcons as { 13 // [key: string]: IconDefinition; 14 // }; 15 // this._iconService.addIcon(...Object.keys(antDesignIcons).map(key => antDesignIcons[key])); 16 17 // Import what you need! ✔️ 18 this._iconService.addIcon(...[ AccountBookFill ]); 19 this._iconService.twoToneColor = { primaryColor: '#1890ff' }; 20 } 21}
You can also provide icons you need in the app.config.ts
:
1import { ApplicationConfig } from '@angular/core'; 2import { provideAntIcons } from '@ant-design/icons-angular'; 3import { AccountBookFill } from '@ant-design/icons-angular/icons'; 4 5export const appConfig: ApplicationConfig = { 6 providers: [ 7 provideAntIcons([ AccountBookFill ]) 8 ] 9};
When you want to render an icon:
1<span antIcon type="ant-cloud" theme="outline"></span>
Checkout the demo for more details.
For icons provided by Ant Design, we provide dynamic loading strategy to reduce bundle's size. Just config your angular.json
and you even don't need to register the icons! Checkout our examples
dir and angular.json
file for more details.
Namespace is first introduced in 2.0.0-beta.2
. It allows users to register their own icons with simple API, support both dynamic loading and static loading.
Say you want to add a panda
icon in animal
namespace. For static loading, you should call addIconLiteral('animal:panda', '<svg>...</svg>')
. For dynamic loading, just put panda.svg
under assets/animal
. And render a panda like: <span antIcon type="animal:panda">
.
Please checkout the demo for more details.
You can find the source code here.
Install dependencies of @ant-design/icons-angular
, and run npm run generate
.
Run npm run generate
and then npm run start
.
Run npm run build:lib
.
You can simply extend this package by creating directives or services that extends IconDirective
and IconService
. And it is worth mentioning that _changeIcon
method returns a Promise<svg>
using which you could add extra modifications.
ng-zorro-antd is a good example of extending this package.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
no binaries found in the repo
Reason
Found 16/30 approved changesets -- score normalized to 5
Reason
6 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 5
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More