[Home](/index.md) › [Docs](/docs.md) › Packages › CDN

# CDN

Use Devicons without npm: hotlink SVGs from devicons.io, or load the icon font, sprite, and catalog from jsDelivr.

You don't need a build step to use Devicons. Individual SVGs are served from devicons.io, and the icon font, sprite, and catalog come from npm through public CDNs. This works for prototypes, CodePen demos, READMEs, and static HTML.

## SVG files

Every icon file is published as a standalone, CORS-enabled SVG:

| Variant | URL |
| --- | --- |
| Color | `https://devicons.io/devicons/icons/{file}.svg` |
| Monochrome (`currentColor`) | `https://devicons.io/devicons/font/{file}.svg` |

`{file}` is one of the icon's file names, listed on each icon page (for example `react`, `nextjs`, `nextjs-icon`). Files ending in `-icon` are the glyph-only mark.

### As `<img>`

```html
<img
  src="https://devicons.io/devicons/icons/react.svg"
  alt="React logo"
  width="48"
  height="48"
/>
```

Markdown works too:

```md
![PostgreSQL](https://devicons.io/devicons/icons/postgresql.svg)
```

### Fetch and inline

Inlining the monochrome SVG lets it follow CSS `color`:

```html
<span class="icon" data-icon="postgresql" aria-hidden="true"></span>

<script type="module">
  const BASE = "https://devicons.io/devicons/font";

  for (const el of document.querySelectorAll("[data-icon]")) {
    const file = el.getAttribute("data-icon");
    const res = await fetch(`${BASE}/${file}.svg`);
    el.innerHTML = await res.text();
  }
</script>
```

> **No per-icon SVGs on npm CDNs** _(info)_
>
> The npm packages don't ship individual SVG files, so jsDelivr and UNPKG have no per-icon SVG URL. Use the devicons.io URLs above.

## Icon font

One `<link>` tag is enough. Pin the version in production.

**jsDelivr**

```html
<link
  rel="stylesheet"
  href="https://cdn.jsdelivr.net/npm/devicons@2.3.0/dist/devicons.css"
/>
```

**UNPKG**

```html
<link
  rel="stylesheet"
  href="https://unpkg.com/devicons@2.3.0/dist/devicons.css"
/>
```

Then use it:

```html
<i class="devicons devicons-react"></i>
```

See the [icon font guide](/docs/icon-font/) for sizing and color.

## SVG sprite

`@dev.icons/core` ships a color sprite at `dist/sprite/sprite-symbol.svg`: one `<svg>` with every icon file as a `<symbol>`. Symbol IDs are file names (`#react`, `#nextjs-icon`).

**jsDelivr**

```html
https://cdn.jsdelivr.net/npm/@dev.icons/core@1.3.0/dist/sprite/sprite-symbol.svg
```

> **Self-host the sprite** _(info)_
>
> Browsers don't follow `<use href>` across origins. Download the sprite (or copy it from `node_modules/@dev.icons/core/dist/sprite/sprite-symbol.svg`) into your static assets and reference it from your own domain. The file is large (about 3.5 MB), so this approach suits pages that need many icons.

```html
<svg class="icon" width="24" height="24" role="img" aria-label="React logo">
  <use href="/sprite-symbol.svg#react"></use>
</svg>
```

## Icon catalog

The list of icon files, with font codepoints, as JSON:

**jsDelivr**

```html
https://cdn.jsdelivr.net/npm/@dev.icons/core@1.3.0/dist/icons.json
```

For names, tags, and aliases, use [`https://devicons.io/search-index.json`](/search-index.json).

## Versioning and caching

npm CDNs honor exact versions and semver ranges:

> **Cache behavior** _(tip)_
>
> - **Pinned** (`@1.2.3`): cached at the edge indefinitely. Use this in production.
> - **Range** (`@^1`): revalidated periodically, so it picks up patches and minor releases.
> - **`@latest`**: changes with every release. Only use it for demos.

The devicons.io SVG URLs aren't versioned. They always serve the current artwork.

## When CDN is not enough

- Tree-shaken, typed components: [`@dev.icons/react`](/docs/react/), [`@dev.icons/vue`](/docs/vue/), [`@dev.icons/svelte`](/docs/svelte/)
- Programmatic access to the icon list: install [`@dev.icons/core`](/docs/core/) locally

---

← Previous: [Icon font](/docs/icon-font.md)
→ Next: [AI agents](/docs/agents.md)

[← All docs](/docs.md)
