About 2,850,000 results
Open links in new tab
  1. Using SVG sprites in a React app - DEV Community

    Mar 18, 2022 · I recently developed a tool called react-svg-sprite-generator which streamlines the generation of SVG sprites for React. I've also set up a GitHub template that automates the …

  2. sprite - SVG use tag and ReactJS - Stack Overflow

    Nov 8, 2014 · Is it possible to use svg sprites and load them in this way in ReactJS? For future visitors, you can now use <use xlinkHref="/svg/svg-sprite#my-icon" />. @MattGreer As of …

  3. How to implement SVG Sprites in React - Medium

    Jun 2, 2021 · Reading this post I’m sure you’ll probably have some ideas about the benefits of using inline SVG instead of plain tags that point to a local SVG file in your assets folder. Let’s …

  4. reactjs - How to display svg icons(.svg files) in UI using React ...

    if you have .svg or an image locally. first you have to install the loader needed for svg and file-loader for images. Then you have to import your icon or image first for example: import logo …

  5. javascript - React and SVG sprite - Stack Overflow

    Nov 26, 2018 · Have you tried exporting the sprites as individual react components, importing them and rendering them as you would any other react component? If you want to reference it …

  6. SVGs in React (almost everything you need to know)

    Apr 21, 2024 · By understanding the different approaches to using SVGs in React and leveraging tools like SVGR and Webpack, you can effectively integrate scalable vector graphics into your …

  7. GitHub - simprl/react-svg-sprite-generator: Svg sprite generator …

    The react-svg-sprite-generator is a library specifically designed for React.js applications. It aids in generating SVG sprites from a directory of SVG files.

  8. A guide to using SVGs in React - LogRocket Blog

    Apr 10, 2025 · In this article, we will explore the advantages of using SVG over other image formats and various ways to implement SVGs in React applications, including their integration, …

  9. Streamline SVG Sprites in Your React Applications

    Aug 28, 2023 · The react-svg-sprite-generator is a CLI tool designed for React.js developers. It helps generate SVG sprites from a directory filled with SVG files, automatically preparing them …

  10. The "best" way to manage icons in React.js - benadam.me

    First, we create a file sprite.svg, and add an <svg> element that wraps a defs element and a <symbol>. Next, we take the icon (that we would have inlined), swap the svg for a symbol …

Refresh