{"id":15428961,"url":"https://github.com/timdaub/react-simple-knob","last_synced_at":"2025-04-19T16:37:59.153Z","repository":{"id":36475660,"uuid":"227432675","full_name":"TimDaub/react-simple-knob","owner":"TimDaub","description":"A simple knob element for react","archived":false,"fork":false,"pushed_at":"2023-01-05T02:49:03.000Z","size":2436,"stargazers_count":5,"open_issues_count":5,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-12-19T21:19:25.189Z","etag":null,"topics":["component","element","knob","react"],"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/TimDaub.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":"2019-12-11T18:24:39.000Z","updated_at":"2024-01-20T13:37:13.000Z","dependencies_parsed_at":"2023-01-17T01:51:10.929Z","dependency_job_id":null,"html_url":"https://github.com/TimDaub/react-simple-knob","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/TimDaub%2Freact-simple-knob","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimDaub%2Freact-simple-knob/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimDaub%2Freact-simple-knob/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TimDaub%2Freact-simple-knob/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TimDaub","download_url":"https://codeload.github.com/TimDaub/react-simple-knob/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232042386,"owners_count":18464351,"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":["component","element","knob","react"],"created_at":"2024-10-01T18:08:12.858Z","updated_at":"2025-01-01T01:32:41.567Z","avatar_url":"https://github.com/TimDaub.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# react-simple-knob\n\n[![npm version](https://badge.fury.io/js/react-simple-knob.svg)](https://badge.fury.io/js/react-simple-knob)\n\n\u003e A simple knob element for react.\n\n\u003ca href=\"https://github.com/TimDaub/react-simple-knob\"\u003e\u003cimg width=\"600\"\nsrc=\"https://github.com/TimDaub/react-simple-knob/raw/master/assets/examplev2.gif\" alt=\"react-simple-knob screenshot\" /\u003e\u003c/a\u003e\n\n\n## Installing\n\n```bash\n$ npm i --save react-simple-knob\n```\n\nor\n\n```bash\n$ yarn add react-simple-knob\n```\n\n## Usage\n\nImport the component\n\n```js\nimport Knob from \"react-simple-knob\";\n```\n\nand then use it:\n\n```js\nfunction App() {\n  const style = {\n    margin: \"20%\",\n    height: \"100px\",\n    fontFamily: \"Arial\",\n    color: \"white\" // Sets font color of value and knob name\n  };\n\n  return (\n    \u003cKnob\n      name=\"Volume\"\n      unit=\"dB\"\n      defaultPercentage={0.7}\n      onChange={console.log}\n      bg=\"black\"\n      fg=\"white\"\n      mouseSpeed={5}\n      transform={p =\u003e parseInt(p * 50, 10) - 50}\n      style={style} /\u003e\n  );\n}\n```\n\n\n## Contributing\n\nTo try the component:\n\n```bash\n$ git clone git@github.com:TimDaub/react-simple-knob.git\n$ npm i\n$ npm run dev\n```\n\n### Current Limitations\n\nAny help is very much appreciated. I'll try to merge your PRs as soon as I can!\nThe following things could be improved:\n\n- [ ] Component doesn't scale automatically based on `name` and `unit` props\n- [ ] Only very limited styling possible\n\n## Changelog\n\n### 0.0.6\n\n- Bugfix: Fix Arc background\n\n### 0.0.5\n\n- Make `fontSize` configurable using `style` props\n\n### 0.0.4\n\n- Bugfix: Make style options (`color` and `fontFamily`) optional\n\n### 0.0.3\n\n- Allow very limited styling\n\n### 0.0.2\n\n- Bugfix: Fix `defaultPercentage` prop\n\n### 0.0.1\n\n- Initial release\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimdaub%2Freact-simple-knob","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimdaub%2Freact-simple-knob","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimdaub%2Freact-simple-knob/lists"}