An open API service indexing awesome lists of open source software.

https://github.com/ajwann/svg-loaders-react

React adaptation of the SVG Loaders library by Sam Herbert
https://github.com/ajwann/svg-loaders-react

loading loading-animations loading-indicator react react-component svg

Last synced: 18 days ago
JSON representation

React adaptation of the SVG Loaders library by Sam Herbert

Awesome Lists containing this project

README

        

[![npm version](https://badge.fury.io/js/svg-loaders-react.svg)](https://badge.fury.io/js/svg-loaders-react)

This is a zero-dependency React adaptation of Sam Herberts [SVG Loaders](https://github.com/SamHerbert/SVG-Loaders) library.

# Usage

## Install from NPM
```bash
npm install svg-loaders-react
```

## Import the SVGLoaders components

### Import all the loaders in a namespaced fashion
You can import all the loaders at once:
```js
import * as SVGLoaders from 'svg-loaders-react';
```
and use them in a namespaced manner:
```js

```

### Import an individual loader
You can also import a single loader:
```js
import { Bars } from 'svg-loaders-react'
```
and use it without any fancy namespacing:
```js

```

## Components

``````

``````

``````

``````

``````

``````

``````

``````

``````

``````

``````

``````

# Options

Each of these components should be able to accept any [SVG tag presentation attributes](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/Presentation) as props.

# Common Usage
```Javascript
// render the Puff loader with a stroke opacity of .125

// render the Puff loader with a stroke of mint green

// render the Puff loader with a stroke of mint green and a stroke opactiy of .125

```