Skip to Content
SVG Index

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 arrow

Needs 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 lucide
lucide:house
lucide:houses
lucide:house-cog
lucide:house-plug
lucide:house-plus

Add 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/icons
Added src/icons/house.svg
Added src/icons/brand-github.svg
Lucide: ISC license, by Lucide Contributors
Tabler Icons: MIT license, by Paweł Kuna

Generate a React Component

Get a component that accepts the usual SVG props in place of a file.

npx svgindex add ph:heart --react
Added Heart.jsx
Phosphor: MIT license, by Phosphor Icons

Browse Libraries

List every library with its icon count and license, or look up the details of one.

npx svgindex info tabler
Tabler Icons (tabler)
Icons    6,238
Author   Paweł Kuna
License  MIT
Style    stroke, 24px grid

Options

OptionCommandEffect
-l, --library <prefix>searchSearch one library, not all of them.
-n, --limit <n>searchNumber of results to print. The default is 40.
-o, --out <dir>addFolder to write into. It is created if missing.
--reactaddWrite a React component (.jsx), not an SVG file.
--stdoutaddPrint 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.