@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 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
- ![31c9262e-aeea-4403-9086-3c8b88885cab](https://github.com/hugeicons/hugeicons-react/assets/130147052/ff91f2f0-095a-4c6d-8942-3af4759f9021)
1
+ ![Hugeicons Logo](https://raw.githubusercontent.com/hugeicons/react/main/assets/logo.png)
2
2
 
3
3
  # @hugeicons/angular
4
4
 
5
- > HugeIcons Pro Angular Component Library - Beautiful and customizable icons for your Angular applications
5
+ > Hugeicons Angular rendering library for fast, customizable icons with TypeScript and tree-shaking support
6
6
 
7
- ## What is HugeIcons?
7
+ ## What is Hugeicons?
8
8
 
9
- HugeIcons is a comprehensive icon library designed for modern web and mobile applications. The free package includes 4,400+ carefully crafted icons in the Stroke Rounded style, while the pro version offers over 40,000 icons across 9 unique styles.
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,400+ Free Icons**: Extensive collection of Stroke Rounded icons covering essential UI elements, actions, and concepts
13
- - **Pixel Perfect**: Every icon is crafted on a 24x24 pixel grid ensuring crisp, clear display at any size
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
- ![a40aa766-1b04-4a2a-a2e6-0ec3c492b96a](https://github.com/hugeicons/hugeicons-react/assets/130147052/f82c0e0e-60ae-4617-802f-812cdc7a58da)
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
+ ![Hugeicons Icons](https://raw.githubusercontent.com/hugeicons/react/main/assets/icons.png)
20
30
 
21
31
  ## Table of Contents
22
- - [What is HugeIcons?](#what-is-hugeicons)
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
- - [Interactive Examples](#interactive-examples)
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
- - 🎨 Customizable colors and sizes
42
- - 💪 TypeScript support with full type definitions
43
- - 🎯 Tree-shakeable for optimal bundle size
44
- - 📦 Multiple bundle formats (ESM, CJS, UMD)
45
- - âš¡ Lightweight and optimized
46
- - 🔄 Alternate icon support for dynamic interactions
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
- First, import the HugeiconsModule in your app.module.ts:
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-your-component',
85
+ selector: 'app-example',
86
+ standalone: true,
87
+ imports: [HugeiconsIconComponent],
90
88
  template: `
91
89
  <hugeicons-icon
92
- [icon]="icon"
90
+ [icon]="SearchIcon"
93
91
  [size]="24"
94
92
  color="currentColor"
95
93
  [strokeWidth]="1.5"
96
- ></hugeicons-icon>
94
+ />
97
95
  `
98
96
  })
99
- export class YourComponent {
100
- icon = SearchIcon;
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` | `[string, Record<string, any>][]` | Required | The main icon to display (array of SVG elements and their attributes) |
109
- | `size` | `number \| string` | `24` | Icon size in pixels. Must be a positive number. String values will be parsed to numbers |
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
- Note:
117
- - The component accepts all standard SVG attributes which will be passed to the root SVG element.
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 { SearchIcon } from '@hugeicons/core-free-icons';
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]="icon"></hugeicons-icon>
143
+ <hugeicons-icon [icon]="Video01Icon" />
134
144
  `
135
145
  })
136
146
  export class BasicComponent {
137
- icon = SearchIcon;
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 { NotificationIcon } from '@hugeicons/core-free-icons';
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]="icon"
163
+ [icon]="Notification02Icon"
152
164
  [size]="32"
153
165
  color="#FF5733"
154
- [strokeWidth]="2"
155
- [absoluteStrokeWidth]="true"
156
- ></hugeicons-icon>
166
+ />
157
167
  `
158
168
  })
159
169
  export class CustomComponent {
160
- icon = NotificationIcon;
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
- #### Theme Toggle
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
- @Component({
210
- selector: 'app-theme-toggle',
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 the HugeiconsModule is properly imported in your module
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 the latest version of the package
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
- > 🌟 **Want access to 36,000+ icons and 9 unique styles?**
269
- > Check out our [Pro Version](https://hugeicons.com/pricing) and visit [docs.hugeicons.com](https://docs.hugeicons.com) for comprehensive documentation.
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
- This project is licensed under the [MIT License](LICENSE.md).
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
- - [HugeIcons Website](https://hugeicons.com) - Browse all available icons
249
+ - [Hugeicons Website](https://hugeicons.com) - Browse all available icons