Socket
Socket
Sign inDemoInstall

react-simple-loading

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-simple-loading

A tiny react component to display while you're loading data


Version published
Weekly downloads
282
decreased by-35.47%
Maintainers
1
Install size
17.3 kB
Created
Weekly downloads
 

Readme

Source

react-simple-loading

A simple React component to display while you're fetching data or waiting for something to load. This component consists of 2 divs: an inner, which is the spinner, and an outer, which is the container. The outer has its height and width set to 100% and uses flexbox to display the spinner perfectly in the center of its parent container.

Installation

npm i --save react-simple-loading

Demo

demo

Example

import React, { Component } from 'react';
import Loading from 'react-simple-loading';

class App extends Component {
	render() {
		return (
			<div>
				<Loading />
			</div>
		);
	}
}

Options

You can change the component size, stroke color, and stroke size by passing props like so:

<Loading 
	color={'firebrick'}
	stroke={'10px'}
	size={'100px'} />

color can be any valid css color:

LightSeaGreen
rgb(0, 0, 0)
rgba(0, 0, 0, 1)
hsl(0, 0%, 0%)
hsla(0, 0%, 0%, 1)
#000
#000000

License

MIT

Keywords

FAQs

Last updated on 13 Mar 2016

Did you know?

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc