Coder Social home page Coder Social logo

hariharanpalani / react-native-svg-example Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kristerkari/react-native-svg-example

0.0 1.0 0.0 5.51 MB

A simple example app that shows how you can use SVG files in React Native

JavaScript 23.61% Java 34.41% Objective-C 24.52% HTML 1.52% Ruby 4.22% Starlark 10.60% Swift 0.54% C 0.58%

react-native-svg-example's Introduction

React Native SVG demo

Platform - Android, iOS and Web contributions welcome

A simple example app that shows how you can use SVG files in React Native.

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 depencies to run React Native

Make sure that you have react-native-cli installed (npm install -g react-native-cli) and XCode (for iOS development) / Android Studio (for Android development) installed and working.

Step 2: Clone the repo and move to project

git clone [email protected]:kristerkari/react-native-svg-example.git
cd react-native-svg-example

Step 3: Install example app's dependencies

npm install

Step 4: Run React Native packager

You can open a new terminal tab to run React Native's packager.

npm start

Step 5: Run app on Android or iOS

First make sure that your Android emulator or iOS simulator is working, then:

npm run ios

or

npm run android

or

npm run web

Screenshots

iOS - Android - Web

react-native-svg-example's People

Contributors

dependabot[bot] avatar kristerkari avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.