_From @cjorasch on March 29, 2018 22:57_
Stencil version:
@stencil/[email protected]
I'm submitting a:
[x] feature request
Icon loading:
The current icon loading approach uses async script requests based on icon names but does not allow the developer to add additional icons.
A potential alternate approach would be to have the <ion-icon> element use a property that specifies the svg content of the icon instead of using a name to specify a path to the icon. This would also carry over to other components that generate icons from names (e.g. <ion-tab>).
For example:
// Imported icon
import {checkbox} from '.../svg/ios-checkbox';
// Inline SVG icon
const myIcon = '<svg ... />';
// Render usage
<ion-icon svg={checkbox} />
<ion-icon svg={myIcon} />
Benefits
Potential Issues
A hybrid approach could be used where either name or svg could be specified. This would enable extensions to the set of icons but would not solve some the issues related to total size of icons.
_Copied from original issue: ionic-team/stencil#682_
Hey! Thanks for opening an issue with us. Since this is a feature request for the ion-icon element I am going to move this issue to the ionic repo.
This is a feature request, asked by many persons over a long time! I think now it is the right time to add this with new ionic4 and svg support
Thanks for the issue! This is now possible with the latest ionicons: https://ionicons.com/usage/
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Most helpful comment
Thanks for the issue! This is now possible with the latest ionicons: https://ionicons.com/usage/