{"id":13525108,"url":"https://github.com/lukeed/preact-progress","last_synced_at":"2025-10-09T18:23:43.272Z","repository":{"id":49316807,"uuid":"82024694","full_name":"lukeed/preact-progress","owner":"lukeed","description":"Simple and lightweight (~590 bytes gzip) progress bar component for Preact","archived":false,"fork":false,"pushed_at":"2017-03-15T08:26:08.000Z","size":7,"stargazers_count":49,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-08T05:47:26.135Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://jsfiddle.net/lukeed/kws8r5v4/","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/lukeed.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":"2017-02-15T05:43:56.000Z","updated_at":"2023-08-31T05:55:25.000Z","dependencies_parsed_at":"2022-09-01T21:01:52.189Z","dependency_job_id":null,"html_url":"https://github.com/lukeed/preact-progress","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukeed%2Fpreact-progress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukeed%2Fpreact-progress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukeed%2Fpreact-progress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukeed%2Fpreact-progress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukeed","download_url":"https://codeload.github.com/lukeed/preact-progress/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222698218,"owners_count":17024879,"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":[],"created_at":"2024-08-01T06:01:16.015Z","updated_at":"2025-10-09T18:23:38.219Z","avatar_url":"https://github.com/lukeed.png","language":"JavaScript","funding_links":[],"categories":["Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# preact-progress [![NPM](https://img.shields.io/npm/v/preact-progress.svg)](https://www.npmjs.com/package/preact-progress)\n\n\u003e Simple and lightweight (~590 bytes gzip) progress bar component; for :atom_symbol: [Preact](https://github.com/developit/preact)\n\n#### [Demo](https://jsfiddle.net/lukeed/kws8r5v4/)\n\n## Install\n\n```\n$ npm install --save preact-progress\n```\n\n\u003e :exclamation: **Pro Tip:** Use [Yarn](https://yarnpkg.com/) to install dependencies 3x faster than NPM!\n\n```html\n\u003cscript src=\"https://unpkg.com/preact-progress@1.0.0/dist/preact-progress.min.js\"\u003e\u003c/script\u003e\n```\n\n## Usage\n\nProvide a `value`; everything else is optional.\n\n```js\nimport { h } from 'preact';\nimport Progress from 'preact-progress';\n\nonChange = (ctx, val) =\u003e console.log(`${val}% complete`);\nonComplete = ctx =\u003e {ctx.base.style.opacity = 0};\n\n\u003cProgress \n  id=\"loader\" className=\"loader\"\n  value={ 16.3 } height=\"3px\" color=\"#6cc644\"\n  onChange={ onChange }\n  onComplete={ onComplete }\n/\u003e\n```\n\n## Properties\n\n#### value\nType: `Number`\u003cbr\u003e\nDefault: `0`\u003cbr\u003e\nThe current progress; between 0 and 100. Mapped to a `style:width` percentage.\n\n#### onStart\nType: `Function`\u003cbr\u003e\nThe callback function when progress bar mounts. Receives the current `Progress` component as its first argument \u0026 the current `value` as its second argument.\n\n#### onChange\nType: `Function`\u003cbr\u003e\nThe callback function whenever the progress value updates. Receives the current `Progress` component as its first argument \u0026 the current `value` as its second argument.\n\n#### onComplete\nType: `Function`\u003cbr\u003e\nThe callback function when progress bar has reached 100%. Receives the current `Progress` component as its only argument.\n\n#### height\nType: `String`\u003cbr\u003e\nDefault: `4px`\u003cbr\u003e\nThe height of the animated progress bar.\n\n#### color\nType: `String`\u003cbr\u003e\nDefault: `black`\u003cbr\u003e\nThe color of the animated progress bar.\n\n#### id\nType: `String`\u003cbr\u003e\nDefault: `none`\u003cbr\u003e\nThe `id` attribute to pass down.\n\n#### className\nType: `String`\u003cbr\u003e\nDefault: `none`\u003cbr\u003e\nThe `className` attribute to pass down. Added to the wrapper element.\n\n## License\n\nMIT © [Luke Edwards](https://lukeed.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukeed%2Fpreact-progress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukeed%2Fpreact-progress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukeed%2Fpreact-progress/lists"}