Socket
Book a DemoInstallSign in
Socket

@aldabil/next-progress

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aldabil/next-progress

Probably the easiest progress bar/skeleton for Next.js

0.0.4
latest
Source
npmnpm
Version published
Weekly downloads
6
Maintainers
1
Weekly downloads
 
Created
Source

Zero-dependency Progress Bar/Skeleton

npm package Follow on Twitter

Install

npm i @aldabil/next-progress

Usage

In your custom _app.tsx|js.

//...some impotrs...
import { Router } from "next/router";
import Progress from "@aldabil/next-progress";

//Progress setup
Progress.configure({
  type: "bar",
  background:
    "linear-gradient(90deg, rgba(251,175,0,1) 0%, rgba(251,175,0,1) 81%, rgba(127,137,0,1) 100%)",
  height: 3,
  //svg: "used with type='fullpage' ",
});
Router.events.on("routeChangeStart", () => Progress.start());
Router.events.on("routeChangeComplete", () => Progress.complete());
Router.events.on("routeChangeError", () => Progress.complete());

const MyApp = (props: MyAppProps) => {
  //...
};

And that's it.

Bar Sandbox Bar type

SVG Sandbox Bar type

Options

OptionValue
typebar / fullpage. When use fullpage type, you need to provide svg as a string toload with skeleton effect.
backgroundstring - background CSS property. bar color or fullpage background
heightnumber. bar height or svg height
svgstring. Like `<svg> .... </svg>` with backticks.

Keywords

Nextjs

FAQs

Package last updated on 08 Sep 2021

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.