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-dotdotdotloader

v1.0.7

Published

React dotdotdot loader or ellipsis loader

Downloads

23

Readme

react-dotdotdotloader

Version npm download

Alt text

An ellipsis loader for React. You can set the time in between the next dot appears and the number of dots that appear.

Demo

http://craiglu.react-dotdotdotloader.hellodeploy.com

Installation

npm install react-dotdotdotloader

Usage

Using NPM

1 . Require react-dotdotdotloader after installation

import { DotDotDotLoader } from 'react-dotdotdotloader'

2 . Include react-dotdotdotloader component

<DotDotDotLoader />

3 . Customize options

<DotDotDotLoader 
  amount={3}
  show={this.state.showLoader}
  interval={500}
  repeat={true}
/>

Options

Option|Type | Description |:---|:---|:--- amount | Integer | Max number of dots to display. (Default is 3) show | Boolean | True will show the loader and false will hide the loader. (Required to show and hide loader) interval | Integer | The number of ms between each dot appearing. (Default is 500) repeat | Boolean | True will have the loader loop from one dot to the amount. If false loader will not loop and ignore amount, adding dots indefinitely until show is false (Default is true)

Styles

react-dotdotdotloader will inherit any styles from its parent container. This allows the loader to have the same style as other components in the same contianer or have its own style. Use the same css properties as if you were changing text styling to change the look of the dots. See live demo for example.

1 . No text styling

HTML

<div className="noStyle">
 No text styles
 <DotDotDotLoader
   amount={this.state.amount}
   interval={this.state.interval}
   repeat={this.state.repeat}
   show={this.state.show}
 />
</div>

CSS

.noStyle {
   margin-bottom: 50px;
}

2 . Bigger font and red color

HTML

<div className="redStyle">
 Bigger font and red font color
 <DotDotDotLoader
   amount={this.state.amount}
   interval={this.state.interval}
   repeat={this.state.repeat}
   show={this.state.show}
 />
</div>

CSS

.redStyle {
   margin-bottom: 50px;
   font-size: 20px;
   color: #e53030;
}

3 . dotdotdotloader can have its own styles

HTML

<div className="greenStyle">
   dotdotdotloader can have its own styles
   <span className="dotStyle">
     <DotDotDotLoader
       amount={this.state.amount}
       interval={this.state.interval}
       repeat={this.state.repeat}
       show={this.state.show}
     />
   </span>
 </div>

CSS

.greenStyle {
   color: #63ba1b;
}
.dotStyle {
   font-size: 100px;
   color: #a22dbc;
}