nuxt / icon

The <Icon> component, supporting Iconify, Emojis and custom components.
https://stackblitz.com/edit/nuxt-icon-playground?file=app.vue
MIT License
864 stars 37 forks source link

feat!: new icon approach #154

Closed antfu closed 2 months ago

antfu commented 2 months ago

This PR introduces a brand new icon approach that works much better with SSR (no flicking on the client side) and should help reduce the load of Iconify's public API by a lot.

Breaking Changes

New Features

Approaches

TODOs

what-the-diff[bot] commented 2 months ago

PR Summary

benjamincanac commented 2 months ago

@antfu Would that be pertinent to add an option to append aria-hidden="true" on every icon?

antfu commented 2 months ago

Maybe a defaultAttrs option in the app config, what do you think?

benjamincanac commented 2 months ago

I'm not sure it's a good idea for @nuxt/ui to configure this for all icons but this could be a nice addition anyway for nuxt-icon users šŸ˜Š

antfu commented 2 months ago

Alright, I think it should be good to go for a few beta releases.

gitFoxCode commented 1 month ago

(set icon.defaultMode: 'svg' to use the previous beahvor)

its icon.defaultMode: 'svg' or icon.mode: 'svg' šŸ˜