Switch from Heroicons to Magic Glyphs
Your coding assistant can move a whole project from Heroicons to Magic Glyphs with the migrate_icons tool. It finds every Heroicons import, matches each icon to a Magic Glyphs icon, shows you the plan, and only then rewrites the files. Supported packages: @heroicons/react/24/outline, /24/solid, /20/solid, /16/solid, and @heroicons/vue.
Tutorial
Section titled “Tutorial”1. Connect your assistant to the local Magic Glyphs server (npx -y magic-glyphs-mcp). Setup for each assistant: Claude Code, Cursor, Copilot, Codex, Gemini CLI, others. With the hosted server, the same tool converts one file at a time.
2. Ask for the switch. From your project folder:
Switch this project from Heroicons to Magic Glyphs. Show me the matches first.
3. Check the plan. The assistant scans the project and changes nothing yet. You get a list like this:
Plan only (run again with write: true to change the files).src/components/Toolbar.tsx: 3 replaced
Icon matches: TrashIcon → trash (same name, free) BellIcon → bell (same name, free) MagnifyingGlassIcon → search (same meaning, free)same name and same meaning are safe. Look at any closest match, and ask for another icon if it is wrong (“use trash-x for the delete button instead”).
4. Apply it. Say “go ahead”. The assistant runs the tool again with write: true, adds npm install magic-glyphs, and the icons animate on hover.
5. Clean up. When nothing imports Heroicons any more, remove it: npm uninstall @heroicons/react.
Before and after
Section titled “Before and after”import { TrashIcon, BellIcon, MagnifyingGlassIcon } from '@heroicons/react/24/outline';
export function Toolbar() { return ( <div className="toolbar"> <TrashIcon className="h-5 w-5" /> <BellIcon className="h-5 w-5" /> <MagnifyingGlassIcon className="h-5 w-5" /> </div> );}import { MagicGlyph } from 'magic-glyphs/react';
export function Toolbar() { return ( <div className="toolbar"> <MagicGlyph name="trash" className="h-5 w-5" /> <MagicGlyph name="bell" className="h-5 w-5" /> <MagicGlyph name="search" className="h-5 w-5" /> </div> );}| Heroicons | Magic Glyphs | Match | |
|---|---|---|---|
TrashIcon |
trash |
same name | free |
BellIcon |
bell |
same name | free |
MagnifyingGlassIcon |
search |
same meaning | free |
Good to know
Section titled “Good to know”- Icons from a
solidpath getvariant="solid";outlineicons use the default outline style. classNameis kept, soh-5 w-5sizing still works.titlebecomeslabel, the accessible name.- Heroicons names map by meaning:
XMarkIconbecomesclose,MagnifyingGlassIconbecomessearch,Cog6ToothIconbecomessettings. - Icons with no good match are left exactly as they were, so nothing breaks. The assistant lists them.
- Some matches are paid icons. Without a licence, ask for free ones: “use only free icons”.
- Want sound? Add
soundto any icon, or ask the assistant to pick sounds for each action.
Other icon sets: all supported sets.