Skyleen77 / next-nprogress-bar

NProgress integration on Next.js compatible with /app and /pages folders
https://next-nprogress-bar.vercel.app
315 stars 24 forks source link

Ability to use CSS variable for color #41

Closed nabilfatih closed 6 months ago

nabilfatih commented 6 months ago

If I can use my CSS variable in color props, that would be good, since I have a lot of theme in the application

Skyleen77 commented 6 months ago

Hello, you can do something like that for exemple : CSS:

:root {
  --nprogress-color: red;
  --nprogress-height: 20px;
}

JS:

<ProgressBar
   height="var(--nprogress-height)"
   color="var(--nprogress-color)"
/>