{"id":15099435,"url":"https://github.com/googlechromelabs/input-knob","last_synced_at":"2025-10-08T05:30:40.647Z","repository":{"id":55102123,"uuid":"198704325","full_name":"GoogleChromeLabs/input-knob","owner":"GoogleChromeLabs","description":"A rotating, touch-sensitive knob web component that you can use like an \u003cinput type=\"range\"\u003e.","archived":true,"fork":false,"pushed_at":"2022-07-20T01:31:11.000Z","size":55,"stargazers_count":80,"open_issues_count":5,"forks_count":11,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-08-09T08:41:38.047Z","etag":null,"topics":["customelement","form","ui","webcomponent"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GoogleChromeLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-24T20:19:11.000Z","updated_at":"2025-04-23T20:35:06.000Z","dependencies_parsed_at":"2022-08-14T12:00:56.765Z","dependency_job_id":null,"html_url":"https://github.com/GoogleChromeLabs/input-knob","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/GoogleChromeLabs/input-knob","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleChromeLabs%2Finput-knob","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleChromeLabs%2Finput-knob/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleChromeLabs%2Finput-knob/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleChromeLabs%2Finput-knob/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GoogleChromeLabs","download_url":"https://codeload.github.com/GoogleChromeLabs/input-knob/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleChromeLabs%2Finput-knob/sbom","scorecard":{"id":57527,"data":{"date":"2025-08-11","repo":{"name":"github.com/GoogleChromeLabs/input-knob","commit":"40c1bb3e7172359052b2947908bd695b8de94220"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/25 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm","Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-15T01:04:40.555Z","repository_id":55102123,"created_at":"2025-08-15T01:04:40.555Z","updated_at":"2025-08-15T01:04:40.555Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278892044,"owners_count":26063919,"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","status":"online","status_checked_at":"2025-10-08T02:00:06.501Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["customelement","form","ui","webcomponent"],"created_at":"2024-09-25T17:20:40.219Z","updated_at":"2025-10-08T05:30:40.408Z","avatar_url":"https://github.com/GoogleChromeLabs.png","language":"JavaScript","readme":"# `\u003cinput-knob\u003e` ⟳ custom element\n\nA rotating, touch-sensitive knob that you can use like an\n`\u003cinput type=\"range\"\u003e`.\n\n## Install\n\nThe `dist` directory contains the CommonJS module (`input-knob.cjs.js`), ES\nmodule (`input-knob.esm.js`) and UMD (`input-knob.umd.js`) variants of the\nelement that you can use directly.\n\nInstall [via npm](https://www.npmjs.com/package/input-knob) and include via the\nbundler of your choice:\n\n```sh\nnpm install --save input-knob\n```\n\nInclude via unpkg:\n\n```html\n\u003cscript src=\"https://unpkg.com/input-knob\"\u003e\u003c/script\u003e\n```\n\n## Usage\n\nThis will create a knob with a minimum value of zero, a maximum of 100, a\ncurrent value of 50, and each full turn of the knob will change the value by 10.\n\n```html\n\u003cinput-knob value=\"50\" scale=\"10\" min=\"0\" max=\"100\"\u003e\u003c/input-knob\u003e\n```\n\n- `value`: Current value, this will update as the knob is turned. Optional,\n  defaults to `0`.\n- `scale`: The change in the value for one full turn. Optional, defaults to `1`.\n- `min`: Minimum allowed value. Optional, defaults to `null`.\n- `max`: Maxium allowed value. Optional, defaults.to `null`.\n\nIf both `min` and `max` are set, then the knob can be turned multiple times to\nreach a different `value`. If only one or none of `min` or `max` is set, then a\nfull turn of the knob will reset the value to `0`.\n\nThese are also exposed as properties on the object and can be set or observed in\nJavaScript:\n\n```javascript\nconst knob = document.querySelector('input-knob');\nknob.value = 42;\n```\n\n### Events\n\nThree event types are dispatched for each point in an interaction:\n\n- `knob-move-start`: fired on initial touch or click.\n- `knob-move-change`: fired repeatedly for each change in rotation.\n- `knob-move-end`: fired when the touch or click is released.\n\n### Style and appearance\n\nThere are two key parts of the element that can be styled. The `\u003cinput-knob\u003e`\nelement itself, which is the container for the inner `rotator` part. The\n`rotator` is accessed using the `::part(rotator)` pseudo-element. The outer\nelement does not rotate, so can be used for general positioning or changing the\nappearance of the outer container. The inner `rotator` represents the part of\nthe knob the user interacts with and will rotate as the `value` changes.\n\nContent inside the `\u003cinput-knob\u003e` tag will also rotate and can be used to do\nthings like provide a top marker for the knob.\n\n```html\n\u003cstyle\u003e\n  input-knob {\n    width: 150px;\n    padding: 10px;\n    border: 2px dashed green;\n    background: lightgreen;\n  }\n\n  input-knob::part(rotator) {\n    box-sizing: border-box;\n    background: lightblue;\n    border: 2px dashed blue;\n    border-radius: 100%;\n    width: 150px;\n    height: 150px;\n  }\n\n  .mark {\n    display: inline-block;\n    width: 100%;\n    text-align: center;\n    font: bold 200% monospace;\n    color: blue;\n  }\n\u003c/style\u003e\n\n\u003cinput-knob value=\"50\" scale=\"10\" min=\"0\" max=\"100\"\u003e\n  \u003cdiv class=\"mark\"\u003e▲\u003c/div\u003e\n\u003c/input-knob\u003e\n```\n\n![A blue knob with an upward tick on a green background](https://cdn.glitch.com/c3562722-7678-47b4-a7c3-5c26e9bc59ef%2Fstyled-knob.png?v=1566478423169)\n\n## Demo\n\nTry the demo at https://input-knob.glitch.me\n\n![An example of \u003cinput-knob\u003e in green with an upward tick indicator and slider below](https://cdn.glitch.com/c3562722-7678-47b4-a7c3-5c26e9bc59ef%2Fintpu-knob-example.png?v=1566478428792)\n\n## Backwards compatibility\n\nFor browsers that do not support custom elements, etc. you can use the\n[`webcomponents.js` polyfills](https://github.com/webcomponents/polyfills/tree/master/packages/webcomponentsjs).\n\nFor browsers that do not support Shadow Parts, the element will add a fallback\nclass and `\u003cspan\u003e` that can by styled.\n\n```css\ninput-knob {\n  width: 150px;\n  padding: 10px;\n  border: 2px dashed green;\n  background: lightgreen;\n}\n\ninput-knob::part(rotator) {\n  box-sizing: border-box;\n  background: lightblue;\n  border: 2px dashed blue;\n  border-radius: 100%;\n  width: 150px;\n  height: 150px;\n}\n\ninput-knob.fallback \u003e span.fallback {\n  display: block;\n  box-sizing: border-box;\n  background: lightblue;\n  border: 2px dashed blue;\n  border-radius: 100%;\n  width: 150px;\n  height: 150px;\n}\n```\n\n# Contributing\n\nIssues and pull requests happily received. Please see\n[CONTRIBUTING.md](CONTRIBUTING.md).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglechromelabs%2Finput-knob","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgooglechromelabs%2Finput-knob","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgooglechromelabs%2Finput-knob/lists"}