Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-nprogress

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-nprogress

A nanoscopic progress bar. With realistic trickle animations to tell your users that something's happening! Completely inspired by NProgress

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
39
increased by34.48%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-nprogress

npm version

A nanoscopic progress bar. With realistic trickle animations to tell your users that something's happening!

Completely inspired by NProgress, all credit goes back to their maintainers and contributors.

Installation

yarn add react-native-nprogress

Usage

Here is the quick how-to example:

import React, { useRef, useState } from "react";
import { NProgress } from "react-native-nprogress";

export const MyApp = () => {
  const [enabled, setEnabled] = useState(false);

  // Change `enabled` each second to mimic loader
  useEffect(() => {
    const int = setInterval(() => {
      setEnabled(e => !e);
    }, 1000);

    return () => {
      clearInterval(int);
    };
  }, []);

  return <NProgress enabled={enabled} />;
};

Props

PropTypeDefaultNote
enabledbooleanfalseStart/stop the progress bar.
heightnumber2The height in pixel of the bar.
backgroundColorstringblueThe background color of the bar.
minimumnumber0.8The minimum percentage used upon starting.
trickleSpeednumber200Adjust how often to trickle/increment, in ms.
fadeOutDurationnumber300Duration of the fade out animation.

Keywords

FAQs

Package last updated on 09 Sep 2019

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc