A Nuxt 3 module to manage SVG as icons, transform SVG to inject dynamically into Vue component, type included.
- Nuxt 3 support
- 🔎 Vue component ready with
SvgIcon
- 🔥 Hot reloading when SVG updated
- 🤙🏻 Reactivity option
- 🗂 Seperated index SVG files
- 📦 No import needed, SVG directly injected
- 🎨 Options to add or clear
style
andclass
global attributes - 🦾 SVG typed, validate by
name
prop (typescript
required)
See documentation.
- Clone repository
- Install dependencies using
pnpm i
- Prepare using
pnpm dev:prepare
- Try playground using
pnpm dev
Create a tgz
.
rm -f ~/nuxt-svg-transformer-*.tgz && npm pack && mv nuxt-svg-transformer-*.tgz ~/
Add it to your Nuxt app.
{
"devDependencies": {
"nuxt-svg-transformer": "file:~/nuxt-svg-transformer-0.0.9.tgz"
}
}
Try nuxt-typed-link to get typed link into your app.
MIT - Made with 💚