{"id":13783738,"url":"https://github.com/freddydumont/redwood-nprogress","last_synced_at":"2025-10-28T08:01:51.475Z","repository":{"id":42902653,"uuid":"251656511","full_name":"freddydumont/redwood-nprogress","owner":"freddydumont","description":"Theme aware NProgress component to use in RedwoodJS apps using Emotion or ThemeUI.","archived":false,"fork":false,"pushed_at":"2023-01-05T18:05:09.000Z","size":2725,"stargazers_count":5,"open_issues_count":17,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-01T13:51:16.673Z","etag":null,"topics":["emotion","loading","nprogress","progress-bar","react","redwood","redwoodjs","spinner","theme-ui"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/redwood-nprogress","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/freddydumont.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-31T16:02:45.000Z","updated_at":"2022-07-18T15:19:33.000Z","dependencies_parsed_at":"2023-02-04T09:31:13.697Z","dependency_job_id":null,"html_url":"https://github.com/freddydumont/redwood-nprogress","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/freddydumont/redwood-nprogress","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freddydumont%2Fredwood-nprogress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freddydumont%2Fredwood-nprogress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freddydumont%2Fredwood-nprogress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freddydumont%2Fredwood-nprogress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/freddydumont","download_url":"https://codeload.github.com/freddydumont/redwood-nprogress/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/freddydumont%2Fredwood-nprogress/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264152804,"owners_count":23564954,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["emotion","loading","nprogress","progress-bar","react","redwood","redwoodjs","spinner","theme-ui"],"created_at":"2024-08-03T19:00:29.681Z","updated_at":"2025-10-28T08:01:51.406Z","avatar_url":"https://github.com/freddydumont.png","language":"TypeScript","funding_links":[],"categories":["Plugins"],"sub_categories":["Twin.macro (warning, possibly broken)"],"readme":"# redwood-nprogress\n\nTheme aware NProgress component to use in RedwoodJS apps using Emotion or ThemeUI.\n\nThis component is a fork of [`next-nprogress-emotion`](https://github.com/freddydumont/next-nprogress-emotion/) package. It was converted to use with RedwoodJS.\n\n## Demo\n\n![GIF Demo](.github/redwood-nprogress.gif)\n\n## Installation\n\n```bash\nyarn add redwood-nprogress\n```\n\nor\n\n```bash\nnpm install redwood-nprogress\n```\n\n## Usage\n\n### Component\n\nBecause this component relies on [`PageLoadingContext`](https://redwoodjs.com/docs/redwood-router#pageloadingcontext), it needs to be imported __under each route__.\n\nIt is thus recommended to use a [`layout`](https://redwoodjs.com/tutorial/layouts) to wrap each of your pages. For example:\n\nImport the component inside your `layouts/GlobalLayout`;\n\n```js\nimport NProgress from 'redwood-nprogress'\n\nconst GlobalLayout = ({ children }) =\u003e {\n  return (\n    \u003c\u003e\n      \u003cNProgress /\u003e\n      {children}\n    \u003c/\u003e\n  )\n}\n\nexport default GlobalLayout\n```\n\nThen wrap your pages in `\u003cGlobalLayout\u003e`:\n\n```javascript\nimport GlobalLayout from 'src/layouts/GlobalLayout/GlobalLayout'\n\nconst HomePage = () =\u003e {\n  return (\n    \u003cGlobalLayout\u003e\n      {/* page content */}\n    \u003c/GlobalLayout\u003e\n  )\n}\n\nexport default HomePage\n```\n\nIf you're using ThemeUI, that's all you need to do. The component will use the primary color by default.\n\nYou can change the color using a theme color or any css color:\n\n```jsx\n// using a theme color\n\u003cNProgress color=\"accent\" /\u003e\n```\n\n```jsx\n// using css\n\u003cNProgress color=\"#fff\" /\u003e\n```\n\nYou can also display a small spinner with the `withSpinner` prop:\n\n```jsx\n\u003cNProgress withSpinner /\u003e\n```\n\n### Config\n\nThe [page loading delay](https://redwoodjs.com/docs/redwood-router#pageloadingcontext) should be configured on Redwood Router itself:\n\n```javascript\n// Routes.js\n\n\u003cRouter pageLoadingDelay={300}\u003e...\u003c/Router\u003e\n```\n\nYou can configure NProgress using its [configuration options](https://github.com/rstacruz/nprogress#configuration).\n\n```jsx\n\u003cNProgress\n  options={{ trickleSpeed: 50 }}\n/\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreddydumont%2Fredwood-nprogress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffreddydumont%2Fredwood-nprogress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffreddydumont%2Fredwood-nprogress/lists"}