Skip to content
R

React Native SVG Transformer

Import SVG files in your React Native project the same way

by kristerkariFree

#358in Design
0In stores

Description

react-native-svg-transformer lets a React Native project import SVG files the same way a web application does. Using SVGR, it transforms eac…

Highlights

  • Import SVG files as React components
  • Same SVG code for React Native and web
  • Works with Expo and bare React Native
  • Configured through SVGR options
  • TypeScript declarations included

Ratings & Reviews

No ratings yet

Be the first to rate React Native SVG Transformer.

People also visit

R

react-native-svg

SVG library for react-native

UI Libraries
Launch
A

@amazon-devices/react-native-svg

SVG library for react-native

UI Libraries
Launch
R

react-native-vector-icons

Customizable icon sets with support for styling and image sources

UI Libraries
Launch
R

@ridemountainpig/svgl-react

Implementation of the Svgl for React applications

UI Libraries
Launch
R

react-native-sfsymbols

Use SF Symbols in iOS apps

UI Libraries
Launch
T

Tiny SVG

Web application for optimizing SVG files and generating framework-specific code

Design
Launch

React Native SVG Transformer FAQ

What does this library do?

It lets you import .svg files in a React Native app and use them as components, the way a web app does with SVGR.

What do I need first?

The react-native-svg library, which the README says must be installed before this package.

How is it configured?

By merging the transformer settings into metro.config.js. The README gives versions for Expo SDK 41 and later, React Native 0.72.1 and later, and 0.59 and later.

Does it work with TypeScript?

Yes, after adding a module declaration for SVG imports to a declarations.d.ts file.

How do I change SVG colours?

Through an .svgrrc file in the project root. The README's example changes fill colours to currentColor for all SVGs.

What are the best React Native SVG Transformer alternatives?

Popular alternatives to React Native SVG Transformer include Tiny SVG and SVG to Compose. See all React Native SVG Transformer alternatives

Developer Stuff

Badges