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
When using unplugin-icons compared to dedicated library of icon pack such as lucide-react, I missed being able to auto complete when trying to import icons on my project as unplugin-icons only provides very generic type definition that is designed to cater all icon pack without having to worry what packs that are installed.
Suggested solution
We can generate stronger types as a postinstall script that scans the @iconify-json declarations and define modules for each of them with previews, same as what lucide-react does.
To this end, I've create a small proof-of-concept that generates better types for unplugin-icons based on what icon packs that are available.
Clear and concise description of the problem
When using
unplugin-icons
compared to dedicated library of icon pack such aslucide-react
, I missed being able to auto complete when trying to import icons on my project asunplugin-icons
only provides very generic type definition that is designed to cater all icon pack without having to worry what packs that are installed.Suggested solution
We can generate stronger types as a postinstall script that scans the
@iconify-json
declarations and define modules for each of them with previews, same as whatlucide-react
does.To this end, I've create a small proof-of-concept that generates better types for unplugin-icons based on what icon packs that are available.
Alternative
No response
Additional context
Demo
Screen.Recording.2025-01-22.221336.mp4
What the documentation looks like
Validations
The text was updated successfully, but these errors were encountered: