@ng-icons/ionicons 26.2.1 → 26.3.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.
Files changed (2) hide show
  1. package/README.md +67 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -211,3 +211,70 @@ bootstrapApplication(AppComponent, {
211
211
  ],
212
212
  });
213
213
  ```
214
+
215
+ ## Experimental Features
216
+
217
+ ### Variable Icon Fonts
218
+
219
+ We have added support for variable icon fonts. This is currently only supported by the [Material Symbols](https://github.com/marella/material-symbols/tree/main/material-symbols#readme) iconset.
220
+
221
+ To enable this feature you must install the icon font and load the `material-symbols` stylesheet. Unlike the static SVG icons, Ng Icons does not bundle the icon font, you must load it yourself.
222
+
223
+ To use it you must register the variable fonts you want to use. The default iconset will be the first one registered.
224
+
225
+ ```ts
226
+ import { provideNgGlyphs } from '@ng-icons/core';
227
+ import {
228
+ withMaterialSymbolsOutlined,
229
+ withMaterialSymbolsRounded,
230
+ } from '@ng-icons/material-symbols';
231
+
232
+ bootstrapApplication(AppComponent, {
233
+ providers: [
234
+ provideNgGlyphs(
235
+ withMaterialSymbolsOutlined(),
236
+ withMaterialSymbolsRounded(),
237
+ ),
238
+ ],
239
+ });
240
+ ```
241
+
242
+ You can then use the following in your HTML:
243
+
244
+ ```html
245
+ <ng-glyph name="settings" />
246
+ ```
247
+
248
+ The following inputs are available on `ng-glyph`:
249
+
250
+ | Name | Type | Description |
251
+ | ----------- | --------- | --------------------------------------------------------------------------- |
252
+ | name | `string` | Define the name of the icon. |
253
+ | glyphset | `string` | Define the glyphset to use. This defaults to the first registered glyphset. |
254
+ | size | `number` | Define the size of the icon. This defaults to the current text size. |
255
+ | opticalSize | `number` | Define the optical size of the icon in `px`. This defaults to `20` |
256
+ | color | `string` | Define the color of the icon. This defaults to the current text color. |
257
+ | weight | `number` | Define the weight of the icon. This defaults to `400`. |
258
+ | grade | `number` | Define the grade of the icon. This defaults to `0`. |
259
+ | fill | `boolean` | Define if the icon should be filled. This defaults to `false`. |
260
+
261
+ The default values for `size`, `weight`, `grade` and `fill` can be configured using the `provideNgGlyphsConfig` function.
262
+
263
+ ```ts
264
+ import { provideNgGlyphsConfig } from '@ng-icons/core';
265
+
266
+ bootstrapApplication(AppComponent, {
267
+ providers: [
268
+ provideNgGlyphsConfig({
269
+ size: 24,
270
+ weight: 400,
271
+ grade: 0,
272
+ fill: false,
273
+ }),
274
+ ],
275
+ });
276
+ ```
277
+
278
+ This feature is experimental and does not follow the same versioning as the rest of the library. Breaking changes may be introduced at any time.
279
+
280
+ We appreciate any feedback you have on this feature.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ng-icons/ionicons",
3
- "version": "26.2.1",
3
+ "version": "26.3.0",
4
4
  "dependencies": {
5
5
  "tslib": "^2.2.0"
6
6
  },