🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

react-loading-indicators

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-loading-indicators

A collection of loading indicators for your application

0.0.9
Source
npm
Version published
Weekly downloads
7.1K
17.54%
Maintainers
1
Weekly downloads
 
Created
Source

react-loading-indicators

A light-weight library providing a collection of easy to use loading indicators for your React projects. Waiting for a response has to be fun🥳.

Built with Typescript. Compatible with react version >=16.8.0.

View DEMO to have a glimpse.

Installation

npm i react-loading-indicators

or

yarn add react-loading-indicators

Components

<Atom>
<Commet>
<CircularProgress> // Default import
<Mosaic>
<Riple>
<Seek>

Examples

Import an individual loader

import React from "react";
import { Atom } from "react-loading-indicators";

const Component = () => <Atom />;

export default Component;

OR Import default loader

import React from "react";
import Loader from "react-loading-indicators";

const Component = ({ variant, color, size }) => (
	<Loader variant={variant} color={color} size={size} />
);

export default Component;

Props

Each of these components will accept the following optional props.

NameDataTypeDefault ValuePossible Values
sizestringmediumsmall, medium, large
colorstring or arraylimegreenCSS color values
styleobjectnullCSS styles
textstring or booleanfalseBoolean value or any string
textColorstringundefinedCSS color values

What do these props do?

  • size - Sets the size of the loader.
  • color - Sets the color of the loader.
  • style - Applies CSS styles to the loader
  • text - Displays message in the loader.
  • textColor - Sets the color of text message in the loader.

The CircularProgress component has an additional variant prop(also optional). Choose between variations of a circular loader that you want:

NameDataTypeDefault Valuevalues
variantstringdiscdisc, split-disc, dotted, bubble-dotted

How to resize

You can resize loader to fit into your needs with the size prop that accepts predefined strings.
You can customize the size further to your preferences by setting fontSize in the style prop of the loader. The style prop allows you to add your own css.

const Component = () => <Commet style={{ fontSize: "10px" }} />;

License

Distributed under the MIT License. See LICENSE for more information.

Contact

@smitterhane

Keywords

react

FAQs

Package last updated on 25 Sep 2022

Did you know?

Socket

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