Add icons dynamically
See original GitHub issueHi, awesome work with this plugins man, enjoying a lot playing around with vueuse
and this one.
Which would be the approach to dynamically insert icons? Let’s say I have a menu metadata in a js object and icon is one of the properties.
One option I guess would be to use <component :is="menuitem.icon">
where icon: IconAccountBox
.
Would make sense to add a component <icon :name="carbon-icon" />
to the repo?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
How to add font awesome icon dynamically from JS file?
I'm trying to add font awesome icons ...
Read more >Add icons dynamically · Issue #7 · antfu/unplugin-icons - GitHub
Which would be the approach to dynamically insert icons? Let's say I have a menu metadata in a js object and icon is...
Read more >how to add font awesome icons to dynamically created li's ...
how to add font awesome icons to dynamically created li's using javascript. ... Just remove the element which contains the icon. Select the ......
Read more >Dynamically Adding Icons to Fields | Fusion 5.7
Sometimes you might want to dynamically prepend a field with an image or an icon depending on the value of a field or...
Read more >Add Icons with React | Font Awesome Docs
There are a few ways to add icons when using React. The easiest way is to use Dynamic Icon Importing which automatically imports...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Made an issue to track on that.
#5, you can use https://github.com/antfu/purge-icons for dynamic loading and this for statical bunding. Guess I should update the README about this 😅