{"id":13680064,"url":"https://github.com/sergiodxa/next-nprogress","last_synced_at":"2025-04-29T19:32:37.380Z","repository":{"id":57169740,"uuid":"138228625","full_name":"sergiodxa/next-nprogress","owner":"sergiodxa","description":"Next.js HOC to integrate NProgress inside your app","archived":true,"fork":false,"pushed_at":"2019-08-10T14:59:36.000Z","size":246,"stargazers_count":148,"open_issues_count":0,"forks_count":14,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-21T01:49:32.982Z","etag":null,"topics":["higher-order-component","hoc","nextjs","nprogress","progress-bar","react","reactjs"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/sergiodxa.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":"2018-06-21T22:38:51.000Z","updated_at":"2024-06-24T04:23:57.000Z","dependencies_parsed_at":"2022-09-11T02:31:29.281Z","dependency_job_id":null,"html_url":"https://github.com/sergiodxa/next-nprogress","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergiodxa%2Fnext-nprogress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergiodxa%2Fnext-nprogress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergiodxa%2Fnext-nprogress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sergiodxa%2Fnext-nprogress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sergiodxa","download_url":"https://codeload.github.com/sergiodxa/next-nprogress/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251569587,"owners_count":21610582,"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":["higher-order-component","hoc","nextjs","nprogress","progress-bar","react","reactjs"],"created_at":"2024-08-02T13:01:12.670Z","updated_at":"2025-04-29T19:32:34.913Z","avatar_url":"https://github.com/sergiodxa.png","language":"JavaScript","funding_links":["https://www.patreon.com/sergiodxa"],"categories":["JavaScript"],"sub_categories":[],"readme":"# next-nprogress\n\nNext.js HOC to integrate NProgress inside your app.\n\nThis is configured to run only after a delay of (default) 300ms. This means if the page change takes too long it will render the progress bar, but if it's fast enough it will avoid rendering it.\n\n\u003ca href=\"https://www.patreon.com/sergiodxa\"\u003e\n\t\u003cimg src=\"https://c5.patreon.com/external/logo/become_a_patron_button@2x.png\" width=\"160\"\u003e\n\u003c/a\u003e\n\n## Installation\n\n```bash\nyarn add next-nprogress\n```\n\n## Usage\n\n### Component\n\nImport it inside your `pages/_app.js`;\n\n```js\nimport NProgress from \"next-nprogress/component\";\n```\n\nRender the component in your [custom App container](https://nextjs.org/docs#custom-%3Capp%3E):\n\n```jsx\n\u003cNProgress /\u003e\n```\n\nThat's it. Now NProgress will work automatically and render the correct styles using styled-jsx.\n\n### Higher order component\n\nImport it inside your `pages/_app.js`;\n\n```js\nimport withNProgress from \"next-nprogress\";\n```\n\nWrap your [custom App container](https://nextjs.org/docs#custom-%3Capp%3E) with it\n\n```js\nconst msDelay = 1000; // default is 300\nexport default withNProgress(msDelay)(MyApp);\n```\n\nInternally it will use the NProgress component and render it alongside your application.\n\n### Advanced Config\n\nYou can configure further configure NProgress using its [configuration options](https://github.com/rstacruz/nprogress#configuration).\n\nConfigure the component:\n\n```jsx\n\u003cNProgress\n  color=\"#29d\"\n  options={{ trickleSpeed: 50 }}\n  showAfterMs={300}\n  spinner\n/\u003e\n```\n\nConfigure the HOC:\n\n```js\nconst msDelay = 200;\nconst options = { trickleSpeed: 50 };\nexport default withNProgress(msDelay, options)(MyApp);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergiodxa%2Fnext-nprogress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsergiodxa%2Fnext-nprogress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsergiodxa%2Fnext-nprogress/lists"}