Socket
Book a DemoInstallSign in
Socket

@weknow/react-svgloader

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@weknow/react-svgloader

ReactJS Component for Ajax SVG file loading and DOM Injection.

1.0.9
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

svgloader

This is a ReactJS Component for SVG file loading by Ajax and DOM injection. This component allow us to insert any SVG file specifying a path and adding a class name for css customization.

Example:

Please refer to the example file to see it working.

To run the example:

  • Clone the repository
  • Execute in console:
cd example
npm install
npm start

General Usage

As you will be able to see in example in order to use the component we need to importe it as:

import SvgLoader from 'bv-react-svgloader';

Then, in the render method we can just call it like:

<SvgLoader src='/svg/logo.svg' className="App-logo svg-logo"/>

Installation

Install this component is easy, just use npm as:

npm install bv-react-svgloader

Keywords

ReactJS

FAQs

Package last updated on 19 Jan 2018

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.