You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: readme.md
+21-3
Original file line number
Diff line number
Diff line change
@@ -19,11 +19,11 @@ label.
19
19
20
20
The Ionicons Web Component is an easy and performant way to use Ionicons in your app. The component will dynamically load an SVG for each icon, so your app is only requesting the icons that you need.
21
21
22
-
Also note that only visible icons are loaded, and icons which are "below the fold" and hidden from the user's view do not make fetch requests for the svg resource.
22
+
Also note that only visible icons are loaded, and icons that are "below the fold" and hidden from the user's view do not make fetch requests for the svg resource.
23
23
24
24
### Installation
25
25
26
-
If you're using [Ionic Framework](https://ionicframework.com/), Ionicons is packaged by default, so no installation is necessary. Want to use Ionicons without Ionic Framework? Place the following `<script>` near the end of your page, right before the closing </body> tag, to enable them.
26
+
If you're using [Ionic Framework](https://ionicframework.com/), Ionicons is packaged by default, so no installation is necessary. Want to use Ionicons without Ionic Framework? Place the following `<script>` near the end of your page, right before the closing `</body>` tag, to enable them.
If you have a different set of icons you would like to load or if the Ionicon icons are hosted on a different page or path, you can set the asset url from which Ionicons pulls the icons via:
52
+
53
+
```ts
54
+
import { setAssetPath } from'@stencil/core'
55
+
56
+
// set root path for loading icons to "<root>/public/svg"
<!-- now pulls the svg from "<root>/public/svg/heart.svg" -->
64
+
<ion-iconname="heart"></ion-icon>
65
+
```
66
+
49
67
## Variants
50
68
Each app icon in Ionicons has a `filled`, `outline` and `sharp` variant. These different variants are provided to make your app feel native to a variety of platforms. The filled variant uses the default name without a suffix. Note: Logo icons do not have outline or sharp variants.
51
69
@@ -56,7 +74,7 @@ Each app icon in Ionicons has a `filled`, `outline` and `sharp` variant. These d
56
74
```
57
75
58
76
### Platform specificity
59
-
When using icons in Ionic Framework you can specify different icons per platform. Use the `md` and `ios` attributes and provide the platformspecific icon/variant name.
77
+
When using icons in Ionic Framework you can specify different icons per platform. Use the `md` and `ios` attributes and provide the platform-specific icon/variant name.
0 commit comments