File: svg.md | Updated: 11/15/2025
Hide navigation
Search
Ctrl K
Home Guides EAS Reference Learn
Reference version
SDK 54
Archive Expo Snack Discord and Forums Newsletter
A library that allows using SVGs in your app.
Android
iOS
macOS
tvOS
Web
Bundled version:
15.12.1
Copy page
react-native-svg allows you to use SVGs in your app, with support for interactivity and animation.
Terminal
Copy
- npx expo install react-native-svg
If you are installing this in an existing React Native app
, make sure to install expo
in your project. Then, follow the installation instructions
provided in the library's README or documentation.
import * as Svg from 'react-native-svg';
SvgA set of drawing primitives such as Circle, Rect, Path, ClipPath, and Polygon. It supports most SVG elements and properties. The implementation is provided by react-native-svg
, and documentation is provided in that repository.
SVG
Copy
Open in Snack
import Svg, { Circle, Rect } from 'react-native-svg'; export default function SvgComponent(props) { return ( <Svg height="50%" width="50%" viewBox="0 0 100 100" {...props}> <Circle cx="50" cy="50" r="45" stroke="blue" strokeWidth="2.5" fill="green" /> <Rect x="15" y="15" width="70" height="70" stroke="red" strokeWidth="2" fill="yellow" /> </Svg> ); }
Here are some helpful links that will get you moving fast!
viewbox for best results on Android.Visit official documentation
Get full information on API and its usage.