Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
react-loading-indicators
Advanced tools
Kit of elegant loading indicators for react applications
A kit of elegant loading indicators to enhance waiting experience of users when your system has something to do in the background for a while.
Built with Typescript. Type safety and improved DX guaranteed.
A glimpse of what is wrapped 🎁.
See DEMO page.
npm install react-loading-indicators
<Atom />
<Commet />
<OrbitProgress />
<BlinkBlur />
<FourSquare />
<TrophySpin />
<ThreeDot />
<LifeLine />
<Mosaic />
<Riple />
<Slab />
import { Atom } from "react-loading-indicators";
/*
| OR directly pull it 😎
| import Atom from "react-loading-indicators/Atom";
*/
const Loading = () => <Atom text="Loading..." />;
export default Loading;
<Suspense fallback={<Loading />}>
<Albums artistId={artist.id} />
</Suspense>
Side note: You can use suspense for data fetching other than lazy loading.
This library is kept at fairly small. You have an option to even shrink further what you include from this library.
You can directly pull a loading indicator you want:
import React from "react";
import OrbitProgress from "react-loading-indicators/OrbitProgress";
const Loading = () => (
<OrbitProgress variant="track-disc" color="crimson" size="small" />
);
export default Loading;
Each of these components will accept the following optional props.
Name | DataType | Default Value | Possible Values |
---|---|---|---|
size | string | medium | small, medium, large |
color | string or array | limegreen | CSS color values |
style | object | null | CSS styles(in Reactjs format) |
text | string or boolean | false | Boolean value or string |
textColor | string | undefined | CSS color values |
speedPlus | number | 0 | Number in the range -5 through 5 |
easing | string | default ease function | CSS easing function |
size
- Sets the size of the loading indicator.color
- Sets the color of the loading indicator.style
- Applies CSS to the loading indicator. This will style the outer element that wraps an indicator.text
- Displays message in the loading indicator.textColor
- Sets the color of text message in the loading indicator.speedPlus
- Controls speed of animation. Negative values slows down. Positive numbers speeds up animation. 0
is normal speed.easing
- Controls the smoothness of the animation, altered with values such as linear
, ease-in
.<OrbitProgress />
and <ThreeDot />
have more than one variant of loading animation. You can pick an alternative animation using a variant
prop.
Name | DataType |
---|---|
variant | string |
<OrbitProgress />
supports the following variants: dotted
, spokes
, disc
, split-disc
, track-disc
. Defaults to disc
.
<ThreeDot />
has the following variants: pulsate
, bounce
, bob
, brick-stack
. Defaults to pulsate
.
You can have an interactive run-through of the variants in the DEMO site.
You can resize a loading indicator to fit into your needs with the size
prop that accepts predefined string values.
For more size customization, you can specify a fontSize
property in the style
prop. A valid value for the fontSize
property will evenly alter the animation's size, for example:
const Loading = () => <ThreeDot style={{ fontSize: "8px" }} />;
Distributed under the MIT License. See LICENSE
for more information.
FAQs
Kit of elegant loading indicators for react applications
We found that react-loading-indicators demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.