SVG Loading and Manipulation Tools for React
Clone or download
Latest commit 81a981f Jul 2, 2018

react-svgmt CircleCI

react-svgmt (SVG Management Tools for React)

Previously known as react-samy-svg


npm install react-svgmt



Import the SvgLoader and SvgProxy elements

import { SvgLoader, SvgProxy } from 'react-svgmt';

Loading and manipulating and SVG

If the path prop is used, then the asset will be fetched from the url.

<SvgLoader path="svg public url here">
  <SvgProxy selector="#Star" stroke={this.state.strokeColor} />

There are two ways to load an SVG file:

  1. From a URL (using the path prop)
  2. From a string with the SVG file contents (using the svgXML prop)

More features, API and examples see



Special thanks (for contributing to the first version of this library) to:

The ajax loading bits are based on: