Skip to content
AXIcons
AXIcons
Theme

Troubleshooting

Fixes for import errors, missing peers, colour problems and bundle size.

“Export IconX doesn't exist”

Export names are Icon plus the PascalCase file name. See naming, or copy the import from the explorer.

“require() of ES Module”

The packages are ES modules only. Use import, set "type": "module", or await import() from CommonJS.

Peer dependency warnings for react

Both component packages need react ^19.3.1. Upgrade React, or use @axcore/xicons with toSvg, which has no React dependency.

React Native: icons don't render

Install react-native-svg in the app and rebuild the native project. In Expo, use npx expo install react-native-svg.

The icon has the wrong colour

  • Set color or a text-* class on the icon or its parent.
  • An <img src="….svg"> always draws black. Inline the SVG or use a component.
  • On React Native, pass color.

Tailwind size classes are ignored

On named icons, classes beat attributes. On the brand Icon component, size writes inline styles that beat classes: drop size when sizing with classes.

The bundle is larger than expected

Look for import * as, the brand Icon component, or getIconSvg. See tree shaking.

Something wrong or missing?Open an issue

Jump to
Browse all iconsIcon library
InstallationGetting started
Quick startGetting started
ReactIntegrations
React NativeIntegrations
↑↓ navigateopen⌘K toggle