React

For @devigner-ui/icons. Upgrade, then run the codemod:

Terminal
npm install @devigner-ui/icons@^3.5.0
npx @devigner-ui/icons migrate

Imports keep working

Every old name is still exported, from the package root and from its own subpath, and renders the renamed icon:

TSX
import { IconBag2 } from "@devigner-ui/icons";          // still works
import { IconBag2 } from "@devigner-ui/icons/Bag2";     // still works
import { IconBagStraps } from "@devigner-ui/icons/BagStraps"; // the new name

An old name is marked @deprecated, so your editor strikes it through and shows the new name on hover, and it logs one warning per name in development. It is silent in production builds. Props, ref forwarding and styles are unchanged: only the name moved.

What the codemod cannot see

IconName values. The IconName type lists current names only, so a string such as const name: IconName = "Bag2" stops type-checking. That is the compiler pointing at a rename for you: use the new name the error suggests, or look it up in the list.

metadata.json lookups. Icons in metadata.json carry their current name. A lookup by an old name finds nothing; each icon now lists its old names in formerly:

TypeScript
import metadata from "@devigner-ui/icons/metadata.json";

const find = (name: string) =>
  metadata.icons.find((i) => i.name === name || i.formerly.includes(name));

find("Bag2")?.name; // "BagStraps"

embeddings.json keys are current names too, for the same reason.

Names built at runtime, such as Icons[`Icon${name}`] with name from your data. Map the stored names once with renames.json; see the codemod page.

Case-only renames

Twenty-seven renames change only capitalisation, such as IconAdditem to IconAddItem. Both work until 4.0, including the old subpath (@devigner-ui/icons/Additem), on every operating system.

Documentation

Browse all 12,480 icons