open-icon-svg
open-icon-svg is the source-of-truth package in this repo. It ships the raw SVG files together with generated names, category maps, aliases, and file/import helpers.
Install
npm install open-icon-svg
Use it when
- you need canonical icon names in TypeScript
- you want to browse icons by category
- you need to normalize loose user input into a valid icon name
- you want direct package file paths for rendering or build tooling
What it exports
OPEN_ICON_NAMESfor the full typed listOPEN_ICON_CATEGORIESfor the category listOPEN_ICON_CATEGORY_TO_NAMESfor grouped browsingOPEN_ICON_KEY_TO_NAMEfor constant-like lookupsresolveOpenIconName,getOpenIconFilePath, andgetOpenIconImportPathfor runtime resolution
Example
import {
OPEN_ICON_KEY_TO_NAME,
getOpenIconImportPath,
resolveOpenIconName,
} from 'open-icon-svg';
const iconName = OPEN_ICON_KEY_TO_NAME.UI_SEARCH_M;
const input = resolveOpenIconName('icon_search-m.svg');
const importPath = getOpenIconImportPath(iconName);
Pair it with
vite-plugin-open-iconfor Vite apps that import SVG modulesopen-icon-transformfor custom pipelines outside Vite