<p align="center">
  <a href="https://github.com/glincker/thesvg">
    <picture>
      <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/glincker/thesvg/main/public/og-image.png" />
      <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/glincker/thesvg/main/public/og-image-light.png" />
      <img src="https://raw.githubusercontent.com/glincker/thesvg/main/public/og-image-light.png" alt="theSVG - 7,600+ Brand SVG Icons" width="700" />
    </picture>
  </a>
</p>

<h3 align="center">theSVG</h3>

<p align="center">
  7,600+ brand SVG icons for developers. Tree-shakeable, typed, open source.
  <br />
  <a href="https://thesvg.org"><strong>Browse all icons &rarr;</strong></a>
</p>

<p align="center">
  <a href="https://trendshift.io/repositories/24396?utm_source=trendshift-badge&utm_medium=badge&utm_campaign=badge-trendshift-24396" target="_blank" rel="noopener noreferrer"><img src="https://trendshift.io/api/badge/trendshift/repositories/24396/daily?language=TypeScript" alt="glincker/thesvg | Trendshift" width="250" height="55"/></a>
</p>

<p align="center">
  <a href="https://www.npmjs.com/package/thesvg"><img src="https://img.shields.io/npm/v/thesvg?color=F97316&label=npm" alt="npm version" /></a>
  <a href="https://www.npmjs.com/package/thesvg"><img src="https://img.shields.io/npm/dm/thesvg?color=F97316" alt="npm downloads" /></a>
  <a href="https://www.jsdelivr.com/package/npm/thesvg"><img src="https://data.jsdelivr.com/v1/package/npm/thesvg/badge" alt="jsDelivr" /></a>
  <a href="https://github.com/glincker/thesvg/blob/main/packages/thesvg/LICENSE"><img src="https://img.shields.io/npm/l/thesvg?color=F97316" alt="license" /></a>
  <a href="https://github.com/glincker/thesvg"><img src="https://img.shields.io/github/stars/glincker/thesvg?style=social" alt="GitHub stars" /></a>
</p>

---

This is the convenience package for [`@thesvg/icons`](https://www.npmjs.com/package/@thesvg/icons). Both packages contain the same 7,600+ icons.

## Install

```bash
npm install thesvg
```

## Quick Start

```ts
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

```ts
// 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

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

## Packages

| Package | Description |
|---------|-------------|
| [`thesvg`](https://www.npmjs.com/package/thesvg) | Convenience wrapper (this package) |
| [`@thesvg/icons`](https://www.npmjs.com/package/@thesvg/icons) | Core icon data |
| [`@thesvg/react`](https://www.npmjs.com/package/@thesvg/react) | Typed React components |
| [`@thesvg/cli`](https://www.npmjs.com/package/@thesvg/cli) | CLI tool |

## Community

Questions, icon requests, or ideas? Join the [GLINR Discord](https://discord.gg/Ar5pcaZB99), where theSVG has its own forum.

[![Discord](https://img.shields.io/discord/829168897080557579?style=flat-square&logo=discord&logoColor=white&label=discord&color=5865F2)](https://discord.gg/Ar5pcaZB99)

## License

MIT. Icons under their respective upstream licenses.

<p align="center">
  <a href="https://thesvg.org">thesvg.org</a>
</p>
