React Native SVG is a comprehensive library that brings Scalable Vector Graphics (SVG) support to React Native applications across various platforms, including iOS, Android, macOS, and Windows, with a compatibility layer for the web. The current stable version is 15.15.4. The project maintains an active release cadence, frequently publishing patch and minor versions to address bugs, improve performance, and ensure compatibility with the latest React Native nightly builds and stable releases. A key differentiator is its extensive support for most SVG elements and properties, facilitating the rendering of complex vector graphics directly within native mobile applications. It also simplifies the process of integrating existing SVG assets by supporting conversion tools like SVGR. Furthermore, `react-native-svg` has adapted to React Native's evolving architecture, including early and ongoing support for the Fabric rendering system, though specific versions are required for compatibility.
npm install react-native-svgVerified import paths — ran on the pinned version, not inferred.
This quickstart renders a basic SVG with a rectangle, circle, text, and line, demonstrating fundamental usage.
Upgrade your `react-native` version to 0.78.0 or higher, or use an older `react-native-svg` version compatible with your `react-native` version.
Consult the `react-native-svg` documentation for a compatibility matrix. For example, `v13.0.0` supports `RN 0.69.0+`, while `v13.10.0` supports `RN 0.72.0+`.
Upgrade to `react-native-svg@15.15.1` or newer, which contains a patch reverting the changes that caused the regression.
Update to `react-native-svg@15.15.3` or a newer version to receive the fix.
Upgrade to `react-native-svg@15.15.3` or newer, which replaces `buffer` decoding with `atob`.
For iOS/macOS, navigate to the `ios` directory and run `pod install`, then rebuild your application. Ensure that you have followed the linking instructions for your specific React Native version and platform (e.g., `npx react-native-windows-init --overwrite` for Windows).
Upgrade `react-native-svg` to version `15.15.3` or newer, which uses `atob` for decoding, resolving this issue.
Ensure you are on the latest `react-native-svg` version (`15.15.3` or newer fixes recent iOS issues). Clean your build folder (`Xcode -> Product -> Clean Build Folder`), reset Metro cache, and reinstall pods (`cd ios && rm -rf Pods && pod install`). For macOS, specifically check for patches in patch versions like `15.15.2`.