Getting started
Install
Section titled “Install”npm install magic-glyphsThe package includes 120 free icons and works straight away. If you bought the full set, log in once per computer with the licence key from your Gumroad receipt:
npx magic-glyphs login XXXXXXXX-XXXXXXXX-XXXXXXXX-XXXXXXXXThat checks your purchase and downloads every icon to your computer. After that, add, bundle, static and the MCP server can use all of them. On a build server, set the MAGIC_GLYPHS_KEY variable to the MG1... key that npx magic-glyphs licence --show-key prints, then run npx magic-glyphs sync.
Pick the row that matches your project.
| Your project | Install | Then read |
|---|---|---|
| A plain HTML page | npx magic-glyphs bundle --out magic-glyphs.js, then load that file |
Web |
| Angular, Svelte, Astro, Alpine, htmx | npm install magic-glyphs |
Web |
| React or Next.js | npm install magic-glyphs |
React and Vue |
| Vue or Nuxt | npm install magic-glyphs |
React and Vue |
| WordPress | Upload the wordpress/magic-glyphs folder as a plugin |
Web |
| Shopify | Add one asset and one snippet to the theme | Web |
| iOS, macOS, Android, Windows, Flutter | npx magic-glyphs add ... --format lottie |
Native |
| You only want SVG files | npx magic-glyphs add ... --format svg |
CLI |
Two ways to ship icons on the web
Section titled “Two ways to ship icons on the web”- One script.
npx magic-glyphs bundle --out public/magic-glyphs.jswrites the runtime plus every icon you are licensed for (name icons afterbundleto include only those). Themagic-glyphs.all.jsinside the package holds the free set only. Good for prototypes, CMS sites and internal tools. - Only what you use. Load the 7 KB runtime and register the icons you need. The CLI writes these files for you:
npx magic-glyphs add heart bell cart --format react --out src/iconsFinding an icon
Section titled “Finding an icon”npx magic-glyphs search shopping cartnpx magic-glyphs list --category arrowsOr browse the sampler page.