react-svg-meters
v0.1.7
Published
<div align="center"> <p>Simple and stylish meters built with SVG for React projects.</p> <img src="https://raw.githubusercontent.com/royledford/react-svg-meters/master/docs/img/meters-animated.gif?raw=true"/> </div>
Downloads
13
Readme
Installation
Install via npm:
$ npm install react-svg-meters --save
or yarn:
$ yarn add react-svg-meters
Usage
Here is quick example to get you started!
import React from 'react'
import { render } from 'react-dom'
import { CircleMeter } from 'react-svg-meters'
function App() {
return <CircleMeter value={23} size={150} />
}
render(<App />, document.querySelector('#app'))
Built With
- This was originally built with create-reat-app but was ejected to build the npm package.
- React - the library used to built the meters.
- Styleguidist - for the documentation.
- Jest and Enzyme - for testing utils.
Development
To setup the development environment.
# to install locally
$ git clone https://github.com/royledford/react-svg-meters.git
# install
$ yarn install
# run the examples
$ yarn start
# and point your browser to http://localhost:3500/
# to run the documentation
$ yarn styleguide
Running tests
$ yarn test
Viewing/Running the documentation
$ yarn styleguide
Building
Documentation
The documentation is hosted as a Github project page on the gh-pages branch.
# to build locally
$ yarn run styleguide:build
The other stuff
svg
Why use Svg? It is supported by all major browsers.
License
This repository has been released under the MIT License.
Acknowledgments
Just a shout out to all the various things that helped maked this library
- Facebook for react and create-react-app
- The folks at React Styleguidist for providing a tool to build the documentation for library
- All the authors, coders, and friends who inspired me to release an open source project