{"id":20804538,"url":"https://github.com/enjikaka/progress-bar","last_synced_at":"2026-05-18T04:13:05.409Z","repository":{"id":147132667,"uuid":"136669456","full_name":"enjikaka/progress-bar","owner":"enjikaka","description":"Web components progress bar","archived":false,"fork":false,"pushed_at":"2025-02-18T15:39:22.000Z","size":7,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-18T15:48:55.733Z","etag":null,"topics":["music","progress-bar","web-animations-api","web-components"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/enjikaka.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-08T21:56:45.000Z","updated_at":"2025-02-18T15:39:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"d08197ac-5f2f-438b-a116-8a9a38392c67","html_url":"https://github.com/enjikaka/progress-bar","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enjikaka%2Fprogress-bar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enjikaka%2Fprogress-bar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enjikaka%2Fprogress-bar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enjikaka%2Fprogress-bar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/enjikaka","download_url":"https://codeload.github.com/enjikaka/progress-bar/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243148996,"owners_count":20244094,"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":["music","progress-bar","web-animations-api","web-components"],"created_at":"2024-11-17T19:09:55.752Z","updated_at":"2025-10-10T06:05:20.098Z","avatar_url":"https://github.com/enjikaka.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `\u003cprogress-bar\u003e`\n\nA small 60 FPS smooth progress bar. Usig the Web Animation API.\n\n## API\n\n### Inputs\n\n| Method | Description | Related media event |\n| --- | --- | --- |\n| `set duration` | Set the duration of the animation. | [`durationchange`](https://developer.mozilla.org/en-US/docs/Web/Events/durationchange) |\n| `set playbackRate` | Set the playbackRate of the animation. | [`ratechange`](https://developer.mozilla.org/en-US/docs/Web/Events/ratechange) |\n| `start()` | Start the animation. | [`play`](https://developer.mozilla.org/en-US/docs/Web/Events/play) |\n| `stop()` | Stop the animation. | [`pause`](https://developer.mozilla.org/en-US/docs/Web/Events/pause) / [`ended`](https://developer.mozilla.org/en-US/docs/Web/Events/ended) |\n\n### Outputs\n\n| CustomEvent | Description | event.detail keys |\n| --- | --- | --- |\n| `progress-bar:seek` | Sends the position to seek to in percent. | `percent`\n\n## Other useful information\n\nThe colour of the progress is styled by the `currentColor` CSS variable. That means that the parent of `\u003cprogress-bar\u003e` controls the colour of the progress via its `color` prop in CSS.\n\n## Usage\n\nThe progress bar fills to it's provided width and height.\n\n```html\n\u003caudio src=\"test.mp3\" controls\u003e\u003c/audio\u003e\n\u003cprogress-bar style=\"width: 200px; height: 5px; background-color: #eee; color: #000\"\u003e\u003c/progress-bar\u003e\n```\n\n```js\nconst $progressBar = document.querySelector('progress-bar');\nconst $audio = document.querySelector('audio');\n\n$audio.addEventListener('durationchange', e =\u003e {\n    $progressBar.duration = e.target.duration;\n}, false);\n$audio.addEventListener('playing', () =\u003e $progressBar.start(), false);\n$audio.addEventListener('pause', () =\u003e $progressBar.stop(), false);\n$audio.addEventListener('waiting', () =\u003e $progressBar.stop(), false);\n$audio.addEventListener('seeked', () =\u003e {\n    if (!$audio.paused) {\n        $progressBar.start();\n    }\n}, false);\n$audio.addEventListener('seeking', () =\u003e $progressBar.stop(), false);\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenjikaka%2Fprogress-bar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenjikaka%2Fprogress-bar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenjikaka%2Fprogress-bar/lists"}