Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@svgr/babel-plugin-transform-react-native-svg

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@svgr/babel-plugin-transform-react-native-svg

Transform DOM elements into react-native-svg components

  • 6.5.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8.3M
increased by5.71%
Maintainers
1
Weekly downloads
 
Created

What is @svgr/babel-plugin-transform-react-native-svg?

@svgr/babel-plugin-transform-react-native-svg is a Babel plugin that transforms SVG imports into React Native components. This allows developers to use SVG files as React components in a React Native project, making it easier to manage and manipulate SVG assets.

What are @svgr/babel-plugin-transform-react-native-svg's main functionalities?

Transform SVG to React Native Component

This feature allows you to import an SVG file and use it as a React Native component. The SVG file is transformed into a React component that can be used within your React Native application.

import MyIcon from './my-icon.svg';

const App = () => (
  <View>
    <MyIcon width={100} height={100} />
  </View>
);

Customizing SVG Properties

You can customize the properties of the SVG component, such as width, height, and fill color, directly in your React Native code.

import MyIcon from './my-icon.svg';

const App = () => (
  <View>
    <MyIcon width={100} height={100} fill="blue" />
  </View>
);

Other packages similar to @svgr/babel-plugin-transform-react-native-svg

Keywords

FAQs

Package last updated on 27 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc