Typically when using SVG, you can take advantage of its smaller size compared to larger image files that might be required to deliver the same high resolution.Īdditionally, since we’re defining SVG as paths, they can scale as large or as small as we want. This plays a part in the small file size. If you open an SVG file on your computer, you might be surprised to find that it’s all code! It’s an open standard that was created by W3C to provide a better way to add images to the web. It’s a file format based on a markup language similar to XML that allows developers and designers to create vector-based images using path definitions.
Part 2: Manually adding SVG files to a React component.Part 1: Adding SVG icons with react-icons.How can we add icons using SVG to our React apps to improve our visual communication? This could be for categorization, an action, or even a warning. Icons are a way to visually communicate concepts and meaning without the use of words.