npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-ui-loaders

v1.0.5

Published

A collection of customizable loading animations for React applications.

Downloads

9

Readme

React UI Loaders

A collection of customizable loading animations for React applications.

Installation

Using npm:

npm install react-ui-loaders

Using yarn:

yarn add react-ui-loaders

Available Loaders

  1. CircleLoader
  2. PulseLoader
  3. SpinnerLoader
  4. DotLoader
  5. RingLoader
  6. WaveLoader
  7. BounceLoader
  8. SquareLoader
  9. HeartbeatLoader
  10. OrbitLoader
  11. GlowLoader
  12. FullScreenLoader

Usage

Basic Loaders

Import the desired loader component and use it in your React component:

  1. Import the loader
import {
    CircleLoader,
    PulseLoader,
    SpinnerLoader,
    DotLoader,
	RingLoader,
    WaveLoader,
    BounceLoader,
    SquareLoader
    HeartbeatLoader,
    OrbitLoader,
    GlowLoader
} from "react-ui-loaders";
  1. Add the loader to your JSX

CircleLoader

<CircleLoader size={80} color="#cba6f7" thickness={4} speed={1} />

PulseLoader

<PulseLoader size={80} color="#cba6f7" />

SpinnerLoader

<SpinnerLoader size={80} color="#cba6f7" />

DotLoader

<DotLoader size={80} color="#cba6f7" />

RingLoader

<RingLoader size={80} color="#cba6f7" />

WaveLoader

<WaveLoader size={80} color="#cba6f7" />

BounceLoader

<BounceLoader size={80} color="#cba6f7" />

SquareLoader

<SquareLoader size={80} color="#cba6f7" />

HeartbeatLoader

<HeartbeatLoader size={80} color="#cba6f7" />

OrbitLoader

<OrbitLoader size={80} color="#cba6f7" />

GlowLoader

<GlowLoader size={80} color="#cba6f7" />
  1. Customize with props as needed

FullScreenLoader

The FullScreenLoader component creates a full-screen overlay with the selected loader centered on the screen:

  1. Import the FullScreenLoader
import { FullScreenLoader } from "react-ui-loaders";
  1. Use state to control the loader's visibility
  2. Add the FullScreenLoader to your JSX, conditionally rendered based on the loading state
function MyComponent() {
    const [isLoading, setIsLoading] = useState(false);
    return (
        <div>
            {isLoading && (
                <FullScreenLoader
                    loaderType="spinner"
                    size={80}
                    color="#ffffff"
                    backgroundColor="rgba(0, 0, 0, 0.7)"
                    isLoading={isLoading}
                />
            )}
            <button onClick={() => setIsLoading(!isLoading)}>
                Toggle Loader
            </button>
        </div>
    );
}
  1. Customize with props as needed

API

CircleLoader

| Prop | Type | Default | Description | | --------- | ------ | --------- | ------------------------------------------------- | | size | number | 40 | Size of the loader in pixels | | color | string | '#61dafb' | Color of the loader | | thickness | number | 4 | Thickness of the circle | | speed | number | 1 | Animation speed (1 is normal, 2 is twice as fast) |

PulseLoader

| Prop | Type | Default | Description | | ----- | ------ | --------- | ---------------------------- | | size | number | 40 | Size of the loader in pixels | | color | string | '#61dafb' | Color of the loader |

SpinnerLoader

| Prop | Type | Default | Description | | ----- | ------ | --------- | ---------------------------- | | size | number | 40 | Size of the loader in pixels | | color | string | '#61dafb' | Color of the loader |

DotLoader

| Prop | Type | Default | Description | | ----- | ------ | --------- | ---------------------------- | | size | number | 40 | Size of the loader in pixels | | color | string | '#61dafb' | Color of the loader |

RingLoader

| Prop | Type | Default | Description | | ----- | ------ | --------- | ---------------------------- | | size | number | 40 | Size of the loader in pixels | | color | string | '#61dafb' | Color of the loader |

WaveLoader

| Prop | Type | Default | Description | | ----- | ------ | --------- | ---------------------------- | | size | number | 40 | Size of the loader in pixels | | color | string | '#61dafb' | Color of the loader |

BounceLoader

| Prop | Type | Default | Description | | ----- | ------ | --------- | ---------------------------- | | size | number | 40 | Size of the loader in pixels | | color | string | '#61dafb' | Color of the loader |

SquareLoader

| Prop | Type | Default | Description | | ----- | ------ | --------- | ---------------------------- | | size | number | 40 | Size of the loader in pixels | | color | string | '#61dafb' | Color of the loader |

HeartbeatLoader

| Prop | Type | Default | Description | | ----- | ------ | --------- | ---------------------------- | | size | number | 40 | Size of the loader in pixels | | color | string | '#61dafb' | Color of the loader |

OrbitLoader

| Prop | Type | Default | Description | | ----- | ------ | --------- | ---------------------------- | | size | number | 40 | Size of the loader in pixels | | color | string | '#61dafb' | Color of the loader |

GlowLoader

| Prop | Type | Default | Description | | ----- | ------ | --------- | ---------------------------- | | size | number | 40 | Size of the loader in pixels | | color | string | '#61dafb' | Color of the loader |

FullScreenLoader

| Prop | Type | Default | Description | | --------------- | ------- | -------------------- | --------------------------------------------------------------- | | loaderType | string | 'circle' | Type of loader to display ('circle', 'pulse', 'spinner', 'dot') | | size | number | 60 | Size of the loader in pixels | | color | string | '#61dafb' | Color of the loader | | thickness | number | - | Thickness of the loader (for applicable types) | | speed | number | - | Animation speed (for applicable types) | | backgroundColor | string | 'rgba(0, 0, 0, 0.5)' | Background color of the full-screen overlay | | isLoading | boolean | true | Whether to display the loader |

License

ISC License

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.