Import Phosphor icons as SVG assets
mainIcons are available as SVG files grouped by weight under the /assets directory. The path pattern is /assets/<weight>/<kebab-name>-<weight>.svg. You can also omit the /assets prefix if your project supports import maps.
Note: Your build tooling may require custom type declarations to handle *.svg imports.
Standard Import
import ghostDuotone from "@phosphor-icons/core/duotone/ghost-duotone.svg";Using SVGR (e.g., Create React App)
If you use SVGR, you can import icons as React components:
import { ReactComponent as GhostDuotone } from "@phosphor-icons/core/duotone/ghost-duotone.svg";