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

@nature-ui/progress

v2.2.13

Published

Progress bar component for Nature UI

Downloads

24

Readme

Progress

The Progress component is an element that displays the progress status for a task that takes a long time or consists of several steps.

Installation

yarn add @nature-ui/progress

# or

npm i @nature-ui/progress

Import Components

import { Progress, CircularProgress } from '@nature-ui/progress';

Usage

<Progress value={50} />

Linear Progress

<Progress value={50} />

Color

Pass the color prop to apply any color that exists in the theme to the progress

<Progress color='pink' value={20} />

Sizes

Pass the size prop to increase the height of the progress

<Progress size="sm" value={20} />
<Progress size="lg" value={20} />

Indeterminate

Pass the value for the progress as undefined to put the progress component in the indeterminate state

<Progress className='m-6' size='xs' value={undefined} />

With stripe

Pass the hasStripe prop to have a beautiful gradient to create a striped effect on the progress

<Progress colorScheme='green-500' hasStripe value={20} />

With animation

Pass the isAnimated prop combined with the hasStrip prop to get a beautifully animated progress

<Progress hasStripe isAnimated value={20} />

With label

Use the ProgressLabel utility component to have a label for the progress component

<Progress value={60} label="Label">

Circular progress

<CircularProgress value={50} />

Circular progress size

Pass the size prop to change the size of the circular progress. You can also pass the thickness prop to change the thickness of the circular progress. The thickness prop is a fractional value whose actual value is determined by the size of the circular progress. In this example the circular progress will have a thickness of 30px. 50% of size (120px) => 30px

<CircularProgress size='120px' thickness={0.5} value={60} />

Circular progress color

Pass the color prop to apply any color that exists in the theme

<CircularProgress color='pink' value={20} />

Circular progress with label

Use the CircularProgressLabel utility component to have a label for the circular progress

<CircularProgress value={60} label='60%' />

Accessibility

  • Progress has a role set to progressbar to denote that it's a progress bar
  • Progress has aria-valuenow set to the percentage completion value passed to the component, to ensure the progress percent is visible to screen readers.

Note

The CircularProgress and the Spinner may seem to serve the same purpose, but semantically, they don't. In the indeterminate state the have the following difference.

CircularProgress

It's used to denote the progress of a determinate operation. Take for example an image upload operation:

  • Before upload begins, the upload progress is indeterminate (at this point, it’s just spinning),
  • Once we know the size of the image and begin upload (using axios) then we update the progress value of the CircularProgress (at this point, it shows the progress). CircularProgress also comes with the aria-* attributes to make its progress value accessible to screenreaders.

CircularProgress also comes with the aria-* attributes to make its progress value accessible to screenreaders.

Spinner

It's more of a “presentational” loading indicator you can use on a page or a component, while it’s loading or before it renders. It doesn’t have any semantic meaning.

To give meaning to a Spinner/loading indicator, ARIA standards require that you mark the area of the component/page that’s loading with aria-busy=true.