Vjacheslav Trushkin @cyberalien.dev · Mar 4

Iconify now offers pre-made SVG+CSS components for React. Usage: 1. Install one of "@iconify-react/" packages 2. Import icon from that package. SVG+CSS minifies SVG by moving all props to CSS, much better than SVG sprites! Documentation: iconify.design/docs/usage/s...

2 likes 2 replies

?

Replies

Vjacheslav Trushkin · Mar 4

Information about Next.js in my reply is incorrect. It works with Next.js, but not when using Webpack. I was using Webpack in tests, so it failed. It works correctly when using Turbopack.

Vjacheslav Trushkin · Mar 4

Important note: these components are for React, not Next.js Turbopack used by Next.js does not allow importing .css files from components, which makes it needlessly complicated to add component with stylesheet. If you are using Next.js, try Vinext instead. It is a fork of Next that uses Vite.