1.3.1 • Published 12 months ago

@nozzlegear/react-svg-progress v1.3.1

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

@nozzlegear/react-svg-progress

An indefinite circular progress inspired by Google's progress indicator. Based off of https://github.com/nathanhoad/react-loading-animation.

Screeshot of React SVG Progress

Installation

With Yarn:

yarn install @nozzlegear/react-svg-progress

Or from NPM:

npm install @nozzlegear/react-svg-progress --save

Importing

The component can be imported like so:

import { CircularProgress } from "@nozzlegear/react-svg-progress";
import CircularProgress from "@nozzlegear/react-svg-progress";

Example

import CircularProgress from "@nozzlegear/react-svg-progress";

function MyComponent() {
    return (
        <div>
            <div>
                {`40px:`}
                <CircularProgress size={40} strokeWidth={7} />
            </div>
            <div>
                {`Green:`}
                <CircularProgress size={40} color={"green"} />
            </div>
            <div>
                {`In Button:`}
                <button className={`btn blue`} >
                    <CircularProgress size={15} margin={"0 5px 0 0"} color={`#ffffff`} />
                    {`Button Text`}
                </button>
            </div>
        </div>
    )
}

Props

Note: react-svg-progress has full TypeScript definitions! You should automatically receive intellisense for all of the props documented below:

NameTypeRequiredDefaultDescription
colorstringfalse'#00bcd4'The progress indicator's color. Must be a valid CSS color string.
sizenumber or stringfalse16A number or string designating the size of the SVG. If a string, the property must be a valid CSS height and width value.
marginstringfalseundefinedA valid CSS margin string.
strokeWidthnumberfalse5Stroke width of the progress indicator.
1.3.1

12 months ago

1.3.0

12 months ago