Command-Line Tool
SVG Icons from Your Terminal
Search 386,054 icons from 240 open-source libraries and drop them into your project as SVG files or React components. Nothing to install and no account.
npx svgindex search arrowNeeds Node 18 or newer. Published on npm as svgindex ↗.
What You Can Do
Search for an Icon
Find icons by name across every library, or narrow the search to one. Each result is an id you can pass to add.
npx svgindex search house --library lucidelucide:house
lucide:houses
lucide:house-cog
lucide:house-plug
lucide:house-plusAdd Icons to Your Project
Write one or more icons as SVG files. The license and author of each library are printed, so you know what to credit.
npx svgindex add lucide:house tabler:brand-github --out src/iconsAdded src/icons/house.svg
Added src/icons/brand-github.svg
Lucide: ISC license, by Lucide Contributors
Tabler Icons: MIT license, by Paweł KunaGenerate a React Component
Get a component that accepts the usual SVG props in place of a file.
npx svgindex add ph:heart --reactAdded Heart.jsx
Phosphor: MIT license, by Phosphor IconsBrowse Libraries
List every library with its icon count and license, or look up the details of one.
npx svgindex info tablerTabler Icons (tabler)
Icons 6,238
Author Paweł Kuna
License MIT
Style stroke, 24px gridOptions
| Option | Command | Effect |
|---|---|---|
| -l, --library <prefix> | search | Search one library, not all of them. |
| -n, --limit <n> | search | Number of results to print. The default is 40. |
| -o, --out <dir> | add | Folder to write into. It is created if missing. |
| --react | add | Write a React component (.jsx), not an SVG file. |
| --stdout | add | Print the icon to the terminal without writing a file. |
Icons are sized at 1em and single-color sets use currentColor, so they follow the size and color of the surrounding text.
Licenses
Every library keeps the license its authors chose. The add command prints the license and author for each library you take icons from; keep any notices that license requires. The licensing guide explains the common ones. The tool itself is MIT licensed.