Documentation

Core

The icon catalog, SVG sprite, and font files as one dependency-free package.

@dev.icons/core holds the catalog of icon files with their font codepoints, icons.json, a color SVG sprite, and the icon font files. It has no dependencies.

The framework packages don’t need it. Install it when you need the list of icon files, the sprite, or the font files for custom tooling or a plugin.

Install

npm install @dev.icons/core

Exports

ExportTypeDescription
ICONSreadonly IconRecord[]Every icon file, sorted by codepoint
getIcon(name: string) => IconRecord | undefinedO(1) lookup by file name
IconRecordtype{ name, codepoint, unicode, isVariant }
interface IconRecord {
  /** File name without `.svg`, e.g. "adonisjs" or "adonisjs-icon". */
  name: string;
  /** Private Use Area codepoint used by the icon font. */
  codepoint: number;
  /** String.fromCodePoint(codepoint). */
  unicode: string;
  /** True when name ends in "-icon" (glyph-only mark). */
  isVariant: boolean;
}

Usage

import { ICONS, getIcon } from "@dev.icons/core";

getIcon("nextjs-icon");
// { name: "nextjs-icon", codepoint: ..., unicode: "...", isVariant: true }

const fullLogos = ICONS.filter((icon) => !icon.isVariant).map((icon) => icon.name);

Files

Subpath exportFile
@dev.icons/core/icons.jsondist/icons.json (same data as ICONS)
@dev.icons/core/spritedist/sprite/sprite-symbol.svg (color sprite, <symbol id="{file}">)
@dev.icons/core/font/cssdist/font/devicons.css
@dev.icons/core/font/woff2dist/font/devicons.woff2
@dev.icons/core/font/ttfdist/font/devicons.ttf

When to use core

  • You need the full list of icon files for search, filtering, or code generation
  • You want to self-host the SVG sprite
  • You’re building a custom icon component for a framework we don’t ship yet
  • You’re writing a bundler plugin, Figma plugin, or CLI tool