@amazon-devices/react-native-svg library provides SVG support to React Native on Vega with a compatibility layer for the web.
The @amazon-devices/react-native-svg library supports most SVG elements and properties like Rect, Circle, Line, Polyline, Polygon, and G. This library performs a simple conversion of SVG code to the react-native-svg component.
This library is system-deployed and available to React Native for Vega apps without a separate installation process. The library is deployed as an autolinking library, which your app links to at runtime. The library is guaranteed to be compatible only with the version of React Native for Vega for which it’s built.
When you uplevel your app’s version of React Native for Vega, consider the best practice of upleveling its library dependencies.
Installation
-
Add the JavaScript library dependency in the
package.jsonfile. -
Reinstall dependencies using the
npm installcommand.
Examples
This example demonstrates how to render aCircle component.
Polygon component.
API reference
See the GitHub documentation page for react-native-svg for information about this library and the API reference. The SVG library on Vega adds support for the following SVG components and touch events.Components
Touch events
Known issues and limitations
Unsupported APIs The following components/props aren’t currently supported on Vega.- Markers
- TouchEvents
PatternandpatternTransform

