Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
redwood-nprogress
Advanced tools
Theme aware NProgress component to use in RedwoodJS apps using Emotion or ThemeUI.
Theme aware NProgress component to use in RedwoodJS apps using Emotion or ThemeUI.
This component is a fork of next-nprogress-emotion
package. It was converted to use with RedwoodJS.
yarn add redwood-nprogress
or
npm install redwood-nprogress
Because this component relies on PageLoadingContext
, it needs to be imported under each route.
It is thus recommended to use a layout
to wrap each of your pages. For example:
Import the component inside your layouts/GlobalLayout
;
import NProgress from 'redwood-nprogress'
const GlobalLayout = ({ children }) => {
return (
<>
<NProgress />
{children}
</>
)
}
export default GlobalLayout
Then wrap your pages in <GlobalLayout>
:
import GlobalLayout from 'src/layouts/GlobalLayout/GlobalLayout'
const HomePage = () => {
return (
<GlobalLayout>
{/* page content */}
</GlobalLayout>
)
}
export default HomePage
If you're using ThemeUI, that's all you need to do. The component will use the primary color by default.
You can change the color using a theme color or any css color:
// using a theme color
<NProgress color="accent" />
// using css
<NProgress color="#fff" />
You can also display a small spinner with the withSpinner
prop:
// using css
<NProgress withSpinner />
The page loading delay should be configured on Redwood Router itself:
// Routes.js
<Router pageLoadingDelay={300}>...</Router>
You can configure NProgress using its configuration options.
<NProgress
options={{ trickleSpeed: 50 }}
/>
FAQs
Theme aware NProgress component to use in RedwoodJS apps using Emotion or ThemeUI.
The npm package redwood-nprogress receives a total of 3 weekly downloads. As such, redwood-nprogress popularity was classified as not popular.
We found that redwood-nprogress demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.