Skip to content

Latest commit

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Zero-dependency Progress Bar/Skeleton

npm packageFollow on Twitter

Install

npmi @aldabil/next-progress

Usage

In your custom _app.tsx|js.

//...some impotrs...import{Router}from"next/router";importProgressfrom"@aldabil/next-progress";//Progress setupProgress.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());constMyApp=(props: MyAppProps)=>{//...};

And that's it.

Demo

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.

About

Zero-dependency progress bar/skeleton for Next.js

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages