@hugeicons/angular 1.0.4 → 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 -132
- package/dist/README.md +89 -132
- package/dist/components/hugeicons-icon.component.d.ts +19 -22
- package/dist/esm2022/components/hugeicons-icon.component.mjs +59 -80
- package/dist/esm2022/lib/types.mjs +1 -1
- package/dist/fesm2022/hugeicons-angular.mjs +58 -79
- package/dist/fesm2022/hugeicons-angular.mjs.map +1 -1
- package/dist/lib/types.d.ts +17 -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,177 +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
|
-
| `absoluteStrokeWidth` | `boolean` | `false` | When true, stroke width is scaled based on icon size (24px base). When false, stroke width is used as-is |
|
|
112
|
-
| `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 |
|
|
113
123
|
| `showAlt` | `boolean` | `false` | When true, displays the altIcon instead of the main icon |
|
|
124
|
+
| `size` | `number \| string` | `24` | Icon size in pixels |
|
|
114
125
|
| `color` | `string` | `currentColor` | Icon color (CSS color value) |
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
- The `size` input accepts both numbers and strings, but strings will be parsed to numbers and must result in a positive number.
|
|
119
|
-
- Icon arrays are tuples of `[elementName: string, attributes: Record<string, any>][]` representing SVG elements.
|
|
120
|
-
- When `absoluteStrokeWidth` is true, the stroke width is scaled proportionally to the icon size (based on a 24px base size).
|
|
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 |
|
|
121
129
|
|
|
122
130
|
## Examples
|
|
123
131
|
|
|
124
132
|
### Basic Usage
|
|
125
133
|
```typescript
|
|
126
|
-
// basic.component.ts
|
|
127
134
|
import { Component } from '@angular/core';
|
|
128
|
-
import {
|
|
135
|
+
import { HugeiconsIconComponent } from '@hugeicons/angular';
|
|
136
|
+
import { Video01Icon } from '@hugeicons/core-free-icons';
|
|
129
137
|
|
|
130
138
|
@Component({
|
|
131
139
|
selector: 'app-basic',
|
|
140
|
+
standalone: true,
|
|
141
|
+
imports: [HugeiconsIconComponent],
|
|
132
142
|
template: `
|
|
133
|
-
<hugeicons-icon [icon]="
|
|
143
|
+
<hugeicons-icon [icon]="Video01Icon" />
|
|
134
144
|
`
|
|
135
145
|
})
|
|
136
146
|
export class BasicComponent {
|
|
137
|
-
|
|
147
|
+
Video01Icon = Video01Icon;
|
|
138
148
|
}
|
|
139
149
|
```
|
|
140
150
|
|
|
141
151
|
### Custom Size and Color
|
|
142
152
|
```typescript
|
|
143
|
-
// custom.component.ts
|
|
144
153
|
import { Component } from '@angular/core';
|
|
145
|
-
import {
|
|
154
|
+
import { HugeiconsIconComponent } from '@hugeicons/angular';
|
|
155
|
+
import { Notification02Icon } from '@hugeicons/core-free-icons';
|
|
146
156
|
|
|
147
157
|
@Component({
|
|
148
158
|
selector: 'app-custom',
|
|
159
|
+
standalone: true,
|
|
160
|
+
imports: [HugeiconsIconComponent],
|
|
149
161
|
template: `
|
|
150
162
|
<hugeicons-icon
|
|
151
|
-
[icon]="
|
|
163
|
+
[icon]="Notification02Icon"
|
|
152
164
|
[size]="32"
|
|
153
165
|
color="#FF5733"
|
|
154
|
-
|
|
155
|
-
[absoluteStrokeWidth]="true"
|
|
156
|
-
></hugeicons-icon>
|
|
166
|
+
/>
|
|
157
167
|
`
|
|
158
168
|
})
|
|
159
169
|
export class CustomComponent {
|
|
160
|
-
|
|
161
|
-
}
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
### Interactive Examples
|
|
165
|
-
|
|
166
|
-
#### Search Bar with Clear Button
|
|
167
|
-
```typescript
|
|
168
|
-
// search.component.ts
|
|
169
|
-
import { Component } from '@angular/core';
|
|
170
|
-
import { SearchIcon, CloseCircleIcon } from '@hugeicons/core-free-icons';
|
|
171
|
-
|
|
172
|
-
@Component({
|
|
173
|
-
selector: 'app-search',
|
|
174
|
-
template: `
|
|
175
|
-
<div>
|
|
176
|
-
<input
|
|
177
|
-
[(ngModel)]="searchValue"
|
|
178
|
-
type="text"
|
|
179
|
-
placeholder="Search..."
|
|
180
|
-
/>
|
|
181
|
-
<hugeicons-icon
|
|
182
|
-
[icon]="SearchIcon"
|
|
183
|
-
[altIcon]="CloseCircleIcon"
|
|
184
|
-
[showAlt]="searchValue.length > 0"
|
|
185
|
-
(click)="clearSearch()"
|
|
186
|
-
></hugeicons-icon>
|
|
187
|
-
</div>
|
|
188
|
-
`
|
|
189
|
-
})
|
|
190
|
-
export class SearchComponent {
|
|
191
|
-
searchValue = '';
|
|
192
|
-
SearchIcon = SearchIcon;
|
|
193
|
-
CloseCircleIcon = CloseCircleIcon;
|
|
194
|
-
|
|
195
|
-
clearSearch(): void {
|
|
196
|
-
if (this.searchValue.length > 0) {
|
|
197
|
-
this.searchValue = '';
|
|
198
|
-
}
|
|
199
|
-
}
|
|
170
|
+
Notification02Icon = Notification02Icon;
|
|
200
171
|
}
|
|
201
172
|
```
|
|
202
173
|
|
|
203
|
-
|
|
204
|
-
```typescript
|
|
205
|
-
// theme-toggle.component.ts
|
|
206
|
-
import { Component } from '@angular/core';
|
|
207
|
-
import { SunIcon, MoonIcon } from '@hugeicons/core-free-icons';
|
|
174
|
+
### More examples and patterns
|
|
208
175
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
template: `
|
|
212
|
-
<button (click)="toggleTheme()">
|
|
213
|
-
<hugeicons-icon
|
|
214
|
-
[icon]="SunIcon"
|
|
215
|
-
[altIcon]="MoonIcon"
|
|
216
|
-
[showAlt]="isDark"
|
|
217
|
-
></hugeicons-icon>
|
|
218
|
-
</button>
|
|
219
|
-
`
|
|
220
|
-
})
|
|
221
|
-
export class ThemeToggleComponent {
|
|
222
|
-
isDark = false;
|
|
223
|
-
SunIcon = SunIcon;
|
|
224
|
-
MoonIcon = MoonIcon;
|
|
225
|
-
|
|
226
|
-
toggleTheme(): void {
|
|
227
|
-
this.isDark = !this.isDark;
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
```
|
|
176
|
+
- Examples: https://hugeicons.com/docs/integrations/angular/examples
|
|
177
|
+
- Best practices: https://hugeicons.com/docs/integrations/angular/best-practices
|
|
231
178
|
|
|
232
179
|
## Performance
|
|
233
180
|
|
|
234
181
|
- **Tree-shaking**: The package is fully tree-shakeable, ensuring only the icons you use are included in your final bundle
|
|
235
182
|
- **Optimized SVGs**: All icons are optimized for size and performance
|
|
236
183
|
- **Code Splitting**: Icons can be easily code-split when using dynamic imports
|
|
184
|
+
- **OnPush Change Detection**: Uses ChangeDetectionStrategy.OnPush for optimal performance
|
|
237
185
|
|
|
238
186
|
## Troubleshooting
|
|
239
187
|
|
|
@@ -241,12 +189,12 @@ export class ThemeToggleComponent {
|
|
|
241
189
|
|
|
242
190
|
1. **Icons not showing up?**
|
|
243
191
|
- Make sure you've installed both `@hugeicons/angular` and `@hugeicons/core-free-icons`
|
|
244
|
-
- Check that
|
|
192
|
+
- Check that `HugeiconsIconComponent` is imported in your component or module
|
|
245
193
|
- Verify that icon names are correctly imported
|
|
246
194
|
|
|
247
195
|
2. **TypeScript errors?**
|
|
248
196
|
- Ensure your `tsconfig.json` includes the necessary type definitions
|
|
249
|
-
- Check that you're using
|
|
197
|
+
- Check that you're using Angular 17.1+ for signal inputs support
|
|
250
198
|
|
|
251
199
|
3. **Bundle size concerns?**
|
|
252
200
|
- Use named imports instead of importing the entire icon set
|
|
@@ -265,8 +213,8 @@ The library supports all modern browsers.
|
|
|
265
213
|
|
|
266
214
|
## Pro Version
|
|
267
215
|
|
|
268
|
-
>
|
|
269
|
-
> 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.
|
|
270
218
|
|
|
271
219
|
### Available Pro Styles
|
|
272
220
|
- **Stroke Styles**
|
|
@@ -280,13 +228,22 @@ The library supports all modern browsers.
|
|
|
280
228
|
- **Special Styles**
|
|
281
229
|
- Bulk Rounded (`@hugeicons-pro/core-bulk-rounded`)
|
|
282
230
|
- Duotone Rounded (`@hugeicons-pro/core-duotone-rounded`)
|
|
231
|
+
- Duotone Standard (`@hugeicons-pro/core-duotone-standard`)
|
|
283
232
|
- Twotone Rounded (`@hugeicons-pro/core-twotone-rounded`)
|
|
284
233
|
|
|
285
234
|
## License
|
|
286
235
|
|
|
287
|
-
|
|
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
|
+
|
|
288
244
|
|
|
289
245
|
## Related
|
|
290
246
|
|
|
247
|
+
- [Changelog](CHANGELOG.md) - Version history and release notes
|
|
291
248
|
- [@hugeicons/core-free-icons](https://www.npmjs.com/package/@hugeicons/core-free-icons) - Free icon package
|
|
292
|
-
- [
|
|
249
|
+
- [Hugeicons Website](https://hugeicons.com) - Browse all available icons
|