thesvg
TypeScript icon, indicating that this package has built-in type declarations

3.0.15 • Public • Published

theSVG - 6,030+ brand SVG icons

thesvg

3,800+ brand SVG icons for developers. Tree-shakeable, typed, open source.
Browse all icons →

npm version npm downloads license GitHub stars


This is the convenience package for @thesvg/icons. Both packages contain the same 3,800+ icons.

Install

npm install thesvg

Quick Start

import github from "thesvg/github";

github.svg;        // raw SVG string
github.title;      // "GitHub"
github.hex;        // "181717"
github.categories; // ["DevTool", "VCS"]
github.variants;   // { default: "<svg...>", mono: "<svg...>" }

Usage

// Named exports
import { svg, title, hex } from "thesvg/github";

// Barrel import (includes all icons)
import { github, vercel, stripe } from "thesvg";

// React
import { svg } from "thesvg/github";
const Logo = () => <div dangerouslySetInnerHTML={{ __html: svg }} />;

// Variants
import icon from "thesvg/github";
const dark = icon.variants["dark"];

CDN

<img src="https://thesvg.org/icons/github/default.svg" alt="GitHub" width="24" />

Packages

Package Description
thesvg Convenience wrapper (this package)
@thesvg/icons Core icon data
@thesvg/react Typed React components
@thesvg/cli CLI tool

License

MIT. Icons under their respective upstream licenses.

thesvg.org