@ng-icons/font-awesome 26.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,213 @@
1
+ <img width="600" alt="logo" src="https://github.com/ng-icons/ng-icons/assets/20795331/8781b0a9-2c8a-4a7f-9afd-13e47d14cffe">
2
+
3
+ # Ng Icons
4
+
5
+ The all-in-one icon library for Angular. This allows you to use icons from multiple icon sets with a single icon component.
6
+ Containing over 32,900 icons for you to use in your projects.
7
+
8
+ Currently, we support the following libraries:
9
+
10
+ - [Bootstrap Icons](https://icons.getbootstrap.com/)
11
+ - [Heroicons](https://heroicons.com/)
12
+ - [Ionicons](https://ionic.io/ionicons)
13
+ - [Material Icons](https://fonts.google.com/icons?selected=Material+Icons)
14
+ - [Material File Icons](https://github.com/PKief/vscode-material-icon-theme)
15
+ - [CSS.gg](https://css.gg/)
16
+ - [Feather Icons](https://feathericons.com/)
17
+ - [Jam Icons](https://jam-icons.com/)
18
+ - [Octicons](https://github.com/primer/octicons)
19
+ - [Radix UI Icons](https://icons.modulz.app/)
20
+ - [Tabler Icons](https://tabler-icons.io/)
21
+ - [Akar Icons](https://akaricons.com/)
22
+ - [Iconoir](https://iconoir.com/)
23
+ - [Cryptocurrency Icons](http://cryptoicons.co/)
24
+ - [Simple Icons](https://simpleicons.org/)
25
+ - [Typicons](https://www.s-ings.com/typicons/)
26
+ - [Dripicons](https://github.com/amitjakhu/dripicons)
27
+ - [UX Aspects](https://uxaspects.github.io/UXAspects/)
28
+ - [Circum Icons](https://circumicons.com/)
29
+ - [Remix Icon](https://remixicon.com/)
30
+ - [Font Awesome](https://fontawesome.com/)
31
+
32
+ Got suggestions for additional iconsets? Create an issue and we can consider adding them!
33
+
34
+ ## Supported Versions
35
+
36
+ | Angular Version | Ng Icon Version |
37
+ | --------------- | --------------- |
38
+ | 11.x.x | 12.x.x |
39
+ | 12.x.x | 12.x.x - 13.x.x |
40
+ | 13.x.x | 13.x.x - 17.x.x |
41
+ | 14.x.x | 17.x.x - 22.x.x |
42
+ | 15.x.x | 23.x.x - 24.x.x |
43
+ | 16.x.x | 25.x.x |
44
+ | 17.x.x | 26.x.x |
45
+
46
+ > **Note**: Ng Icons relies on modern browser features and is designed to work on evergreen browsers. We do not support older browsers such as IE11.
47
+
48
+ ## Installation
49
+
50
+ You must install the `@ng-icons/core` package, however you only need to install the iconset libraries you intend to use.
51
+
52
+ E.g:
53
+
54
+ ```bash
55
+ npm i @ng-icons/core @ng-icons/heroicons ...
56
+ ```
57
+
58
+ or
59
+
60
+ ```bash
61
+ yarn add @ng-icons/core @ng-icons/heroicons ...
62
+ ```
63
+
64
+ ## Packages
65
+
66
+ The following packages are available:
67
+
68
+ | Package | License |
69
+ | -------------------------------- | ------------ |
70
+ | `@ng-icons/core` | MIT |
71
+ | `@ng-icons/bootstrap-icons` | MIT |
72
+ | `@ng-icons/heroicons` | MIT |
73
+ | `@ng-icons/ionicons` | MIT |
74
+ | `@ng-icons/material-icons` | Apache 2.0 |
75
+ | `@ng-icons/material-file-icons` | MIT |
76
+ | `@ng-icons/css.gg` | MIT |
77
+ | `@ng-icons/feather-icons` | MIT |
78
+ | `@ng-icons/jam-icons` | MIT |
79
+ | `@ng-icons/octicons` | MIT |
80
+ | `@ng-icons/radix-icons` | MIT |
81
+ | `@ng-icons/tabler-icons` | MIT |
82
+ | `@ng-icons/akar-icons` | MIT |
83
+ | `@ng-icons/iconoir` | MIT |
84
+ | `@ng-icons/cryptocurrency-icons` | CC0-1.0 |
85
+ | `@ng-icons/simple-icons` | CC0-1.0 |
86
+ | `@ng-icons/typicons` | CC-BY-SA-4.0 |
87
+ | `@ng-icons/dripicons` | CC-BY-SA-4.0 |
88
+ | `@ng-icons/ux-aspects` | Apache 2.0 |
89
+ | `@ng-icons/circum-icons` | MPL-2.0 |
90
+ | `@ng-icons/remixicon` | Apache 2.0 |
91
+ | `@ng-icons/font-awesome` | CC BY 4.0 |
92
+
93
+ ## Usage
94
+
95
+ Import the `NgIconsModule` and register the icons you wish to use:
96
+
97
+ ```ts
98
+ import { NgIconsModule } from '@ng-icons/core';
99
+ import { featherAirplay } from '@ng-icons/feather-icons';
100
+ import { heroUsers } from '@ng-icons/heroicons/outline';
101
+
102
+ @NgModule({
103
+ imports: [
104
+ BrowserModule,
105
+ NgIconsModule.withIcons({ featherAirplay, heroUsers }),
106
+ ],
107
+ })
108
+ export class AppModule {}
109
+ ```
110
+
111
+ You can register icons in multiple modules, this allows icons to be lazy loaded in child modules.
112
+
113
+ You can then use the icon in your templates:
114
+
115
+ ```html
116
+ <ng-icon name="featherAirplay"></ng-icon>
117
+ ```
118
+
119
+ | Name | Type | Description |
120
+ | ----------- | -------------------- | ---------------------------------------------------------------------------------- |
121
+ | size | `string` | Define the size of the icon. This defaults to the current font size. |
122
+ | color | `string` | Define the color of the icon. This defaults to the current text color. |
123
+ | strokeWidth | `string` \| `number` | Define the stroke-width of the icon. This only works on iconsets that use strokes. |
124
+
125
+ ### Standalone Components
126
+
127
+ As of version 18.0.0 Ng Icons nows supports standalone components. You can import icons using the `provideIcons` function which can be placed anywhere you can register providers. The optimal location
128
+ would be in the `@Component` providers array.
129
+
130
+ You can also import the component directly by importing `NgIconComponent` or the `NG_ICON_DIRECTIVES` constant.
131
+
132
+ ```ts
133
+ import { NgIconComponent, provideIcons } from '@ng-icons/core';
134
+ import { featherAirplay } from '@ng-icons/feather-icons';
135
+ import { heroUsers } from '@ng-icons/heroicons/outline';
136
+
137
+ @Component({
138
+ standalone: true,
139
+ imports: [NgIconComponent],
140
+ providers: [provideIcons({ featherAirplay, heroUsers })],
141
+ })
142
+ export class AppComponent {}
143
+ ```
144
+
145
+ ### Global Configuration
146
+
147
+ You can configure the default size of icons by providing a `NgIconsConfig` object to the `provideNgIconsConfig`:
148
+
149
+ #### NgModule
150
+
151
+ ```ts
152
+ import { NgIconsModule, provideNgIconsConfig } from '@ng-icons/core';
153
+ import { featherAirplay } from '@ng-icons/feather-icons';
154
+
155
+ @NgModule({
156
+ imports: [
157
+ BrowserModule,
158
+ NgIconsModule.withIcons({ featherAirplay, heroUsers }),
159
+ ],
160
+ providers: [
161
+ provideNgIconsConfig({
162
+ size: '1.5em',
163
+ color: 'red',
164
+ }),
165
+ ],
166
+ })
167
+ export class AppModule {}
168
+ ```
169
+
170
+ #### Standalone
171
+
172
+ ```ts
173
+ import {
174
+ NgIconComponent,
175
+ provideIcons,
176
+ provideNgIconsConfig,
177
+ } from '@ng-icons/core';
178
+
179
+ bootstrapApplication(AppComponent, {
180
+ providers: [
181
+ provideNgIconsConfig({
182
+ size: '1.5em',
183
+ }),
184
+ ],
185
+ });
186
+ ```
187
+
188
+ ### Dynamically Loading Icons
189
+
190
+ The most common way to load icons is simply by registering them individually, however you may want to load icons lazily from a URL, or generate an SVG programatically on the fly. This can be achived using an icon loader. Icon loaders are a function that receives the name of the requested icon, and can return an `Observable<string>`, `Promise<string>` or a `string` containing the SVG to render. Within this function you can do whatever you need to retrieve an icon.
191
+
192
+ The function is also run within the injection context, this allows you to inject dependencies as you need such as the `HttpClient`.
193
+
194
+ ```ts
195
+ bootstrapApplication(AppComponent, {
196
+ providers: [
197
+ provideNgIconLoader(name => {
198
+ const http = inject(HttpClient);
199
+ return http.get(`/assets/icons/${name}.svg`);
200
+ }),
201
+ ],
202
+ });
203
+ ```
204
+
205
+ Additionally add caching to your loader to prevent multiple requests for the same icon.
206
+
207
+ ```ts
208
+ bootstrapApplication(AppComponent, {
209
+ providers: [
210
+ provideNgIconLoader(name => {...}, withCaching()),
211
+ ],
212
+ });
213
+ ```
@@ -0,0 +1,3 @@
1
+ # @ng-icons/font-awesome/brands
2
+
3
+ Secondary entry point of `@ng-icons/font-awesome`. It can be used by importing from `@ng-icons/font-awesome/brands`.