proposal: add option to load custom icons from external sources
See original GitHub issueWe are trying (@antfu and me) to make a universal toolkit to share some logic to allow load svg icons from any source on unocss
and unplugin-icons
.
Instead creating a shared repo to use it on both projects, I think the better place will be here: this way you can also use it for testing before adding new collections or new icons to existing collections.
The logic to be included here, right now, is only supported on unplugin-icons
:
- load from external sources (network or filesystem): currently only built-in support for filesystem with optional transform callback for all icons
- load from inline sources: all collections and their icons on the configuration
The main problem here is that all collection/icon loading logic is not asynchronous:
- https://github.com/iconify/iconify/blob/master/packages/utils/src/icon-set/get-icon.ts
- https://github.com/iconify/iconify/blob/master/packages/utils/src/icon-set/get-icons.ts
On unplugin-icons
we load the collections/icons using async tasks:
- https://github.com/antfu/unplugin-icons/blob/main/src/core/modern.ts#L57
- https://github.com/antfu/unplugin-icons/blob/main/src/core/modern.ts#L25
/cc @cyberalien
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Custom Icons · Issue #12 · antfu/unplugin-icons - GitHub
After thinking about it, I would propose to add one configuration key customCollections (or ... Then import icons by placing this in your...
Read more >Custom Icons (Pro) - Elementor
Upload your own custom icons to your website using Elementor Pro's Custom Icons feature. You can use Fontello, Icomoon, or Fontastic for the...
Read more >How To Use Custom SVG Icons in Angular Material
Step 1 — Creating an Angular Project and Installing Dependencies. First, open your terminal and create a new project directory: mkdir angular- ...
Read more >How I Made an Icon System Out of CSS Custom Properties
The SVG source code is compiled with the Sass function that encodes them in data URI and then stores the icons in CSS...
Read more >How do I get more icons in PowerPoint? - PPT Productivity
To access PowerPoint icons, navigate to the 'Insert' tab, click 'Pictures' then select 'Stock images' from the dropdown menu. Insert Icons into ...
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
Sure, that can be done.
However, I have few concerns:
camelize
andpascalize
can be added to utils.Awaitable
type can be imported. Node specific functions, such as ones that work with file system, should be isolated in separate files to make sure they are not imported by accident.I’ve just made new branch
dev/more-utils
frommaster