{"content":"Making Icon Sets Easy With Web Origami\n\nOver the years, I’ve used different icon sets on my blog. Right now I use Heroicons.\n\nThe recommended way to use them is to copy/paste the source from the website directly into your HTML. It’s a pretty straightforward process:\n\n * Go to the website\n * Search for the icon you want\n * Hover it\n * Click to “Copy SVG”\n * Go back to your IDE and paste it\n\nIf you’re using React or Vue, there are also npm packages you can install so you can import the icons as components.\n\nBut I’m not using either of those frameworks, so I need the raw SVGs and there’s no npm i for those so I have to manually grab the ones I want.\n\nIn the past, my approach has been to copy the SVGs into individual files in my project, like:\n\nsrc/\n icons/\n home.svg\n about.svg\n search.svg\n\nThen I have a “component” for reading those icons from disk which I use in my template files to inline the SVGs in my HTML. For example:\n\n// Some page template file\nimport { Icon } from './Icon.js'\nconst template = `