Icon conventions #12648
jasongitmail
started this conversation in
Ideas
Icon conventions
#12648
Replies: 2 comments 9 replies
-
It sounds to me like you're asking for svelte-add/svelte-add#315 |
Beta Was this translation helpful? Give feedback.
9 replies
-
at least tailwind v3 is technically inferior to unocss in vite and might be harder to integrate because you need a custom extractor for it. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'd like to see more conventions in SvelteKit.
Conventions 1.) help devs move faster, 2.) help the ecosystem grow faster by reducing waste researching/trying/rebuilding the same wheel, and 3.) in this case, improve composability of components, which will become especially useful with AI generation and as more devs build re-usable component libraries (e.g. Shadcn Svelte, Aceternity Svelte, etc) (to allow direct component usage, prevent duplicate loading of the same icon due to different icon loading methods, avoid requiring different setup, etc).
Icons are an opportunity for a convention (in official docs and create-svelte-app template) because they seem to be a solved problem given the below strategy (credit to Anthony Fu).
Set up
npm add -D unocss @iconify/json
vite.config.ts
src/routes/+layout.svelte
, add:Usage
Benefits of this icon approach
unplug-icons
does)Background
unplug-icons
that he also created.The ask
I'd like to see this as a convention in SvelteKit templates and docs. It's easy to set up, once a person knows how, but having conventions provides important benefits noted in the intro.
CC @benmccann For his Twitter thread where I originally saw Anthony Fu's response.
Beta Was this translation helpful? Give feedback.
All reactions