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

darco-loader

v1.0.8

Published

A Loader component with progress bar line, to react Suspense hook

Downloads

5

Readme

Darco-Loader

A React Suspense Loader Component

This loader is purpose-built to seamlessly integrate with the Suspense React component. It serves as a visual aid, enhancing the user experience by providing loading feedback during asynchronous operations. The React Suspense Loader Component is designed to work effortlessly within React applications, ensuring a smooth and user-friendly interface while content is being fetched or loaded.

Install

npm i darco-loader

Usage

  import Loader from 'darco-loader'

  const newStyles = {
      container: {
        width: '50%',
        height: '50vh',
      }
    }

  // change the with and height of the loader main container.
  <Loader styles={newStyles}/> 
    

Props

Type: Type "static" | "interval"

- default  "static"
- static: must be called once with a time, number parameter.
- interval: must be called in loop.

Time:Type number

- must be an integer in seconds
- default: 2

ProgressShow: Type boolean

- show the progress porcentage.
- default: true

Styles Type React.CSSProperties

The loaderStyleProps type is an interface that defines various styling options for a loader component. It is used to configure the appearance of different parts of the loader.

container Property

  • Type: Object

  • Description: Styling options for the main outer container of the loader.

    • width (optional): Width of the container.(default: 100%)
    • height (optional): Height of the container.(default: 100vh)
    • backgroundColor (optional): Background color of the container.

progressBarContainer Property

  • Type: Object

  • Description: Styling options for the container that holds the progress bar.

    • width (optional): Width of the container.(default: 80%)
    • height (optional): Height of the container.(default: auto)
    • backgroundColor (optional): Background color of the container.
    • display (optional): Display mode of the container. Values can be 'block' or 'none'.
    • borderRadius (optional): Border radius of the container.

progressbar Property

  • Type: Object

  • Description: Styling options for the progress bar itself.

    • height (optional): Height of the progress bar.
    • backgroundColor (optional): Background color of the progress bar.

progressPointer Property

  • Type: Object

  • Description: Styling options for the progress pointer (indicator).

    • width (optional): Width of the progress pointer.
    • height (optional): Height of the progress pointer.
    • backgroundColor (optional): Background color of the progress pointer.
    • shadowColor (optional): Shadow color of the progress pointer.

finalScreen Property

  • Type: Object

  • Description: Styling options for the final screen of the loader.

    • backgroundColor (optional): Background color of the final screen.
    • time (optional): Time delay (in milliseconds) before transitioning to the final screen.

The Styles type provides a flexible way to customize the appearance of a loader component by specifying different styling options for its various parts. You can use it to control the dimensions, colors, and other visual properties of the loader elements to match your application's design.