as

Settings
Sign out
Notifications
Alexa
亚马逊应用商店
AWS
文档
Support
Contact Us
My Cases
新手入门
设计和开发
应用发布
参考
支持
跳转到主要内容
The @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, 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

  1. Add the JavaScript library dependency in the package.json file. Select the tab for your React Native version.
  1. Reinstall dependencies using the npm install command.

Examples

This example demonstrates how to render a Circle component.

API reference

Check out dedicated documentation page for info about this library, API reference and more on GitHub. The SVG library on Vega adds support for the SVG components and touch events listed, as listed below.

Components

Touch events

Exceptions on Vega

Unsupported APIs The following components/props aren’t currently supported on Vega.
  • Markers
  • TouchEvents
  • Pattern and patternTransform
Unsupported components The following SVG components aren’t currently supported on Vega.

Additional resources

For information on other libraries, see Supported Third-Party Libraries and Services.
最后修改于 2026年7月10日