Awesome
Expo SVG demo
A simple example app that shows how you can use SVG files in Expo.
The SVG images used in this app can be found from the logos folder.
How does it work?
The .svg
files can be imported inside a React component:
import Logo from "./logo.svg";
The images can then be used as a component:
<Logo width={120} height={40} />
Try it
Step 1: Install Expo
- Install Expo: https://docs.expo.dev/get-started/installation/
Step 2: Clone the repo and move to project
git clone git@github.com:kristerkari/react-native-svg-expo-example.git
cd react-native-svg-expo-example
Step 3: Install example app's dependencies
expo install
Step 4: Run Expo
yarn start
Screenshots
iOS - Android - Web
<img src="screenshots/ios.png" width="33.3333%"><img src="screenshots/android.png" width="33.3333%"><img src="screenshots/web.png" width="33.3333%">