@hugeicons/angular 1.0.2 → 1.0.5
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/CHANGELOG.md +22 -0
- package/LICENSE.md +21 -0
- package/PRO-LICENSE.md +14 -0
- package/README.md +89 -128
- package/dist/README.md +89 -128
- package/dist/components/hugeicons-icon.component.d.ts +20 -20
- package/dist/esm2022/components/hugeicons-icon.component.mjs +61 -70
- package/dist/esm2022/lib/types.mjs +1 -1
- package/dist/fesm2022/hugeicons-angular.mjs +60 -69
- package/dist/fesm2022/hugeicons-angular.mjs.map +1 -1
- package/dist/lib/types.d.ts +18 -1
- package/package.json +32 -19
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# @hugeicons/angular
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## 1.0.5
|
|
5
|
+
|
|
6
|
+
### Patch Changes
|
|
7
|
+
|
|
8
|
+
- Added "How It Works" section explaining the rendering library concept
|
|
9
|
+
- Standardized documentation structure across all framework packages
|
|
10
|
+
- Updated icon counts to 4,600+ free / 46,000+ pro
|
|
11
|
+
- Updated docs URL to hugeicons.com/docs
|
|
12
|
+
- Updated to use single image source from React repository
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
## 1.0.0
|
|
16
|
+
|
|
17
|
+
### Major Changes
|
|
18
|
+
|
|
19
|
+
- Initial release
|
|
20
|
+
- Standalone component support
|
|
21
|
+
- Signal-based inputs for Angular 17.1+
|
|
22
|
+
- Full TypeScript support
|
package/LICENSE.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Hugeicons
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/PRO-LICENSE.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Hugeicons Pro License
|
|
2
|
+
|
|
3
|
+
**Full license:** https://hugeicons.com/license-agreement
|
|
4
|
+
|
|
5
|
+
## Summary
|
|
6
|
+
|
|
7
|
+
Pro icon packs (`@hugeicons-pro/*`) require a valid Hugeicons Pro license.
|
|
8
|
+
|
|
9
|
+
* One seat per user who directly uses and accesses icons
|
|
10
|
+
* Cannot redistribute source files (License Key, SVG, fonts, Figma files, etc.—see the license for details)
|
|
11
|
+
* Cannot create competing icon products
|
|
12
|
+
* See more in the license page
|
|
13
|
+
|
|
14
|
+
For complete terms, seats, refunds, and legal details, see the full license above.
|
package/README.md
CHANGED
|
@@ -1,25 +1,36 @@
|
|
|
1
|
-

|
|
2
2
|
|
|
3
3
|
# @hugeicons/angular
|
|
4
4
|
|
|
5
|
-
>
|
|
5
|
+
> Hugeicons Angular rendering library for fast, customizable icons with TypeScript and tree-shaking support
|
|
6
6
|
|
|
7
|
-
## What is
|
|
7
|
+
## What is Hugeicons?
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Hugeicons is a large icon set for modern web and mobile apps. The free package includes 4,600+ Stroke Rounded icons. The Pro package provides 46,000+ icons across 10 styles.
|
|
10
|
+
|
|
11
|
+
## How It Works
|
|
12
|
+
|
|
13
|
+
This package (`@hugeicons/angular`) is a **rendering library** - it provides the `HugeiconsIconComponent` that displays icons in your Angular app. The icons themselves come from separate icon packages:
|
|
14
|
+
|
|
15
|
+
- **Free icons**: `@hugeicons/core-free-icons` (4,600+ icons)
|
|
16
|
+
- **Pro icons**: `@hugeicons-pro/core-*` packages (46,000+ icons, requires license)
|
|
10
17
|
|
|
11
18
|
### Key Highlights
|
|
12
|
-
- **4,
|
|
13
|
-
- **
|
|
19
|
+
- **4,600+ Free Icons**: Stroke Rounded set for unlimited personal and commercial projects
|
|
20
|
+
- **46,000+ Pro Icons, 10 Styles**: Stroke, Solid, Bulk, Duotone, and Twotone families for sharp, rounded, and standard needs with richer variants
|
|
21
|
+
- **Pixel Perfect Grid**: Built on a 24x24 grid for crisp rendering at any size
|
|
14
22
|
- **Customizable**: Easily adjust colors, sizes, and styles to match your design needs
|
|
23
|
+
- **Tree Shaking Ready**: Named exports keep bundles lean in modern bundlers
|
|
15
24
|
- **Regular Updates**: New icons added regularly to keep up with evolving design trends
|
|
16
25
|
|
|
17
|
-
> 📚 **Looking for Pro Icons?** Check out our comprehensive documentation at [docs.hugeicons.com](https://docs.hugeicons.com) for detailed information about pro icons, styles, and advanced usage.
|
|
18
26
|
|
|
19
|
-
|
|
27
|
+
> **Looking for Pro Icons?** Check out our docs at [hugeicons.com/docs](https://hugeicons.com/docs) for detailed information about pro icons, styles, and advanced usage.
|
|
28
|
+
|
|
29
|
+

|
|
20
30
|
|
|
21
31
|
## Table of Contents
|
|
22
|
-
- [What is
|
|
32
|
+
- [What is Hugeicons?](#what-is-hugeicons)
|
|
33
|
+
- [How It Works](#how-it-works)
|
|
23
34
|
- [Features](#features)
|
|
24
35
|
- [Installation](#installation)
|
|
25
36
|
- [Usage](#usage)
|
|
@@ -27,7 +38,7 @@ HugeIcons is a comprehensive icon library designed for modern web and mobile app
|
|
|
27
38
|
- [Examples](#examples)
|
|
28
39
|
- [Basic Usage](#basic-usage)
|
|
29
40
|
- [Custom Size and Color](#custom-size-and-color)
|
|
30
|
-
- [
|
|
41
|
+
- [More examples and patterns](#more-examples-and-patterns)
|
|
31
42
|
- [Performance](#performance)
|
|
32
43
|
- [Troubleshooting](#troubleshooting)
|
|
33
44
|
- [Browser Support](#browser-support)
|
|
@@ -38,12 +49,12 @@ HugeIcons is a comprehensive icon library designed for modern web and mobile app
|
|
|
38
49
|
|
|
39
50
|
## Features
|
|
40
51
|
|
|
41
|
-
-
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
52
|
+
- Customizable colors, sizes, and stroke width
|
|
53
|
+
- TypeScript support with full type definitions
|
|
54
|
+
- Tree shakeable for optimal bundle size
|
|
55
|
+
- Standalone component (Angular 17.1+)
|
|
56
|
+
- Signal-based inputs for optimal performance
|
|
57
|
+
- Alternate icon support for dynamic interactions
|
|
47
58
|
|
|
48
59
|
## Installation
|
|
49
60
|
|
|
@@ -63,173 +74,114 @@ bun add @hugeicons/angular @hugeicons/core-free-icons
|
|
|
63
74
|
|
|
64
75
|
## Usage
|
|
65
76
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
```typescript
|
|
69
|
-
import { NgModule } from '@angular/core';
|
|
70
|
-
import { HugeiconsModule } from '@hugeicons/angular';
|
|
71
|
-
|
|
72
|
-
@NgModule({
|
|
73
|
-
imports: [
|
|
74
|
-
HugeiconsModule
|
|
75
|
-
],
|
|
76
|
-
// ...
|
|
77
|
-
})
|
|
78
|
-
export class AppModule { }
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
Then use it in your component:
|
|
77
|
+
The `HugeiconsIconComponent` is a standalone component. Import it directly in your component:
|
|
82
78
|
|
|
83
79
|
```typescript
|
|
84
|
-
// your.component.ts
|
|
85
80
|
import { Component } from '@angular/core';
|
|
81
|
+
import { HugeiconsIconComponent } from '@hugeicons/angular';
|
|
86
82
|
import { SearchIcon } from '@hugeicons/core-free-icons';
|
|
87
83
|
|
|
88
84
|
@Component({
|
|
89
|
-
selector: 'app-
|
|
85
|
+
selector: 'app-example',
|
|
86
|
+
standalone: true,
|
|
87
|
+
imports: [HugeiconsIconComponent],
|
|
90
88
|
template: `
|
|
91
89
|
<hugeicons-icon
|
|
92
|
-
[icon]="
|
|
90
|
+
[icon]="SearchIcon"
|
|
93
91
|
[size]="24"
|
|
94
92
|
color="currentColor"
|
|
95
93
|
[strokeWidth]="1.5"
|
|
96
|
-
|
|
94
|
+
/>
|
|
97
95
|
`
|
|
98
96
|
})
|
|
99
|
-
export class
|
|
100
|
-
|
|
97
|
+
export class ExampleComponent {
|
|
98
|
+
SearchIcon = SearchIcon;
|
|
101
99
|
}
|
|
102
100
|
```
|
|
103
101
|
|
|
102
|
+
### NgModule Usage (Legacy)
|
|
103
|
+
|
|
104
|
+
If you're using NgModules, import the component in your module:
|
|
105
|
+
|
|
106
|
+
```typescript
|
|
107
|
+
import { NgModule } from '@angular/core';
|
|
108
|
+
import { HugeiconsIconComponent } from '@hugeicons/angular';
|
|
109
|
+
|
|
110
|
+
@NgModule({
|
|
111
|
+
imports: [HugeiconsIconComponent],
|
|
112
|
+
// ...
|
|
113
|
+
})
|
|
114
|
+
export class AppModule { }
|
|
115
|
+
```
|
|
116
|
+
|
|
104
117
|
## Inputs
|
|
105
118
|
|
|
106
119
|
| Input | Type | Default | Description |
|
|
107
120
|
|-------|------|---------|-------------|
|
|
108
|
-
| `icon` | `
|
|
109
|
-
| `
|
|
110
|
-
| `strokeWidth` | `number \| undefined` | `undefined` | Width of the icon strokes (works with stroke-style icons) |
|
|
111
|
-
| `altIcon` | `[string, Record<string, any>][]` | `undefined` | Alternative icon that can be used for states, interactions, or animations |
|
|
121
|
+
| `icon` | `IconSvgObject` | Required | The main icon to display |
|
|
122
|
+
| `altIcon` | `IconSvgObject` | - | Alternative icon for states, interactions, or dynamic icon swapping |
|
|
112
123
|
| `showAlt` | `boolean` | `false` | When true, displays the altIcon instead of the main icon |
|
|
124
|
+
| `size` | `number \| string` | `24` | Icon size in pixels |
|
|
113
125
|
| `color` | `string` | `currentColor` | Icon color (CSS color value) |
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
- The `size` input accepts both numbers and strings, but strings will be parsed to numbers and must result in a positive number.
|
|
118
|
-
- Icon arrays are tuples of `[elementName: string, attributes: Record<string, any>][]` representing SVG elements.
|
|
126
|
+
| `strokeWidth` | `number` | - | Width of the icon strokes |
|
|
127
|
+
| `absoluteStrokeWidth` | `boolean` | `false` | When true, the stroke width will be scaled relative to the icon size |
|
|
128
|
+
| `class` | `string` | - | CSS classes to apply to the icon |
|
|
119
129
|
|
|
120
130
|
## Examples
|
|
121
131
|
|
|
122
132
|
### Basic Usage
|
|
123
133
|
```typescript
|
|
124
|
-
// basic.component.ts
|
|
125
134
|
import { Component } from '@angular/core';
|
|
126
|
-
import {
|
|
135
|
+
import { HugeiconsIconComponent } from '@hugeicons/angular';
|
|
136
|
+
import { Video01Icon } from '@hugeicons/core-free-icons';
|
|
127
137
|
|
|
128
138
|
@Component({
|
|
129
139
|
selector: 'app-basic',
|
|
140
|
+
standalone: true,
|
|
141
|
+
imports: [HugeiconsIconComponent],
|
|
130
142
|
template: `
|
|
131
|
-
<hugeicons-icon [icon]="
|
|
143
|
+
<hugeicons-icon [icon]="Video01Icon" />
|
|
132
144
|
`
|
|
133
145
|
})
|
|
134
146
|
export class BasicComponent {
|
|
135
|
-
|
|
147
|
+
Video01Icon = Video01Icon;
|
|
136
148
|
}
|
|
137
149
|
```
|
|
138
150
|
|
|
139
151
|
### Custom Size and Color
|
|
140
152
|
```typescript
|
|
141
|
-
// custom.component.ts
|
|
142
153
|
import { Component } from '@angular/core';
|
|
143
|
-
import {
|
|
154
|
+
import { HugeiconsIconComponent } from '@hugeicons/angular';
|
|
155
|
+
import { Notification02Icon } from '@hugeicons/core-free-icons';
|
|
144
156
|
|
|
145
157
|
@Component({
|
|
146
158
|
selector: 'app-custom',
|
|
159
|
+
standalone: true,
|
|
160
|
+
imports: [HugeiconsIconComponent],
|
|
147
161
|
template: `
|
|
148
162
|
<hugeicons-icon
|
|
149
|
-
[icon]="
|
|
163
|
+
[icon]="Notification02Icon"
|
|
150
164
|
[size]="32"
|
|
151
165
|
color="#FF5733"
|
|
152
|
-
|
|
166
|
+
/>
|
|
153
167
|
`
|
|
154
168
|
})
|
|
155
169
|
export class CustomComponent {
|
|
156
|
-
|
|
157
|
-
}
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
### Interactive Examples
|
|
161
|
-
|
|
162
|
-
#### Search Bar with Clear Button
|
|
163
|
-
```typescript
|
|
164
|
-
// search.component.ts
|
|
165
|
-
import { Component } from '@angular/core';
|
|
166
|
-
import { SearchIcon, CloseCircleIcon } from '@hugeicons/core-free-icons';
|
|
167
|
-
|
|
168
|
-
@Component({
|
|
169
|
-
selector: 'app-search',
|
|
170
|
-
template: `
|
|
171
|
-
<div>
|
|
172
|
-
<input
|
|
173
|
-
[(ngModel)]="searchValue"
|
|
174
|
-
type="text"
|
|
175
|
-
placeholder="Search..."
|
|
176
|
-
/>
|
|
177
|
-
<hugeicons-icon
|
|
178
|
-
[icon]="SearchIcon"
|
|
179
|
-
[altIcon]="CloseCircleIcon"
|
|
180
|
-
[showAlt]="searchValue.length > 0"
|
|
181
|
-
(click)="clearSearch()"
|
|
182
|
-
></hugeicons-icon>
|
|
183
|
-
</div>
|
|
184
|
-
`
|
|
185
|
-
})
|
|
186
|
-
export class SearchComponent {
|
|
187
|
-
searchValue = '';
|
|
188
|
-
SearchIcon = SearchIcon;
|
|
189
|
-
CloseCircleIcon = CloseCircleIcon;
|
|
190
|
-
|
|
191
|
-
clearSearch(): void {
|
|
192
|
-
if (this.searchValue.length > 0) {
|
|
193
|
-
this.searchValue = '';
|
|
194
|
-
}
|
|
195
|
-
}
|
|
170
|
+
Notification02Icon = Notification02Icon;
|
|
196
171
|
}
|
|
197
172
|
```
|
|
198
173
|
|
|
199
|
-
|
|
200
|
-
```typescript
|
|
201
|
-
// theme-toggle.component.ts
|
|
202
|
-
import { Component } from '@angular/core';
|
|
203
|
-
import { SunIcon, MoonIcon } from '@hugeicons/core-free-icons';
|
|
174
|
+
### More examples and patterns
|
|
204
175
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
template: `
|
|
208
|
-
<button (click)="toggleTheme()">
|
|
209
|
-
<hugeicons-icon
|
|
210
|
-
[icon]="SunIcon"
|
|
211
|
-
[altIcon]="MoonIcon"
|
|
212
|
-
[showAlt]="isDark"
|
|
213
|
-
></hugeicons-icon>
|
|
214
|
-
</button>
|
|
215
|
-
`
|
|
216
|
-
})
|
|
217
|
-
export class ThemeToggleComponent {
|
|
218
|
-
isDark = false;
|
|
219
|
-
SunIcon = SunIcon;
|
|
220
|
-
MoonIcon = MoonIcon;
|
|
221
|
-
|
|
222
|
-
toggleTheme(): void {
|
|
223
|
-
this.isDark = !this.isDark;
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
```
|
|
176
|
+
- Examples: https://hugeicons.com/docs/integrations/angular/examples
|
|
177
|
+
- Best practices: https://hugeicons.com/docs/integrations/angular/best-practices
|
|
227
178
|
|
|
228
179
|
## Performance
|
|
229
180
|
|
|
230
181
|
- **Tree-shaking**: The package is fully tree-shakeable, ensuring only the icons you use are included in your final bundle
|
|
231
182
|
- **Optimized SVGs**: All icons are optimized for size and performance
|
|
232
183
|
- **Code Splitting**: Icons can be easily code-split when using dynamic imports
|
|
184
|
+
- **OnPush Change Detection**: Uses ChangeDetectionStrategy.OnPush for optimal performance
|
|
233
185
|
|
|
234
186
|
## Troubleshooting
|
|
235
187
|
|
|
@@ -237,12 +189,12 @@ export class ThemeToggleComponent {
|
|
|
237
189
|
|
|
238
190
|
1. **Icons not showing up?**
|
|
239
191
|
- Make sure you've installed both `@hugeicons/angular` and `@hugeicons/core-free-icons`
|
|
240
|
-
- Check that
|
|
192
|
+
- Check that `HugeiconsIconComponent` is imported in your component or module
|
|
241
193
|
- Verify that icon names are correctly imported
|
|
242
194
|
|
|
243
195
|
2. **TypeScript errors?**
|
|
244
196
|
- Ensure your `tsconfig.json` includes the necessary type definitions
|
|
245
|
-
- Check that you're using
|
|
197
|
+
- Check that you're using Angular 17.1+ for signal inputs support
|
|
246
198
|
|
|
247
199
|
3. **Bundle size concerns?**
|
|
248
200
|
- Use named imports instead of importing the entire icon set
|
|
@@ -261,8 +213,8 @@ The library supports all modern browsers.
|
|
|
261
213
|
|
|
262
214
|
## Pro Version
|
|
263
215
|
|
|
264
|
-
>
|
|
265
|
-
> Check out our [Pro Version](https://hugeicons.com/pricing) and visit [docs
|
|
216
|
+
> **Want access to 46,000+ icons and 10 unique styles?**
|
|
217
|
+
> Check out our [Pro Version](https://hugeicons.com/pricing) and visit our [docs](https://hugeicons.com/docs) for detailed documentation.
|
|
266
218
|
|
|
267
219
|
### Available Pro Styles
|
|
268
220
|
- **Stroke Styles**
|
|
@@ -276,13 +228,22 @@ The library supports all modern browsers.
|
|
|
276
228
|
- **Special Styles**
|
|
277
229
|
- Bulk Rounded (`@hugeicons-pro/core-bulk-rounded`)
|
|
278
230
|
- Duotone Rounded (`@hugeicons-pro/core-duotone-rounded`)
|
|
231
|
+
- Duotone Standard (`@hugeicons-pro/core-duotone-standard`)
|
|
279
232
|
- Twotone Rounded (`@hugeicons-pro/core-twotone-rounded`)
|
|
280
233
|
|
|
281
234
|
## License
|
|
282
235
|
|
|
283
|
-
|
|
236
|
+
The code in this package (`@hugeicons/angular`) is licensed under the MIT License.
|
|
237
|
+
|
|
238
|
+
This package only provides rendering utilities. It does not include or grant any rights to Hugeicons icon assets. Using Pro icon styles requires a valid Hugeicons Pro license.
|
|
239
|
+
|
|
240
|
+
Hugeicons icon packs are licensed separately:
|
|
241
|
+
- **Free icon packs**: use the license included with the specific free icon package you install.
|
|
242
|
+
- **Pro icon packs (`@hugeicons-pro/*`)**: require a paid Hugeicons Pro license and are governed by the Hugeicons Pro Terms (see [Pro License](PRO-LICENSE.md).).
|
|
243
|
+
|
|
284
244
|
|
|
285
245
|
## Related
|
|
286
246
|
|
|
247
|
+
- [Changelog](CHANGELOG.md) - Version history and release notes
|
|
287
248
|
- [@hugeicons/core-free-icons](https://www.npmjs.com/package/@hugeicons/core-free-icons) - Free icon package
|
|
288
|
-
- [
|
|
249
|
+
- [Hugeicons Website](https://hugeicons.com) - Browse all available icons
|