{"id":15621782,"url":"https://github.com/raathigesh/retoggle","last_synced_at":"2025-05-15T14:05:35.454Z","repository":{"id":40003317,"uuid":"156081244","full_name":"Raathigesh/retoggle","owner":"Raathigesh","description":"🎨 UI controls as React Hooks to control your component state from outside","archived":false,"fork":false,"pushed_at":"2020-07-05T10:08:00.000Z","size":1070,"stargazers_count":1383,"open_issues_count":5,"forks_count":27,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-31T15:17:18.050Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://retoggle.netlify.com/","language":"TypeScript","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/Raathigesh.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-11-04T12:45:35.000Z","updated_at":"2024-10-24T10:30:48.000Z","dependencies_parsed_at":"2022-06-26T07:31:20.438Z","dependency_job_id":null,"html_url":"https://github.com/Raathigesh/retoggle","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/Raathigesh%2Fretoggle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raathigesh%2Fretoggle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raathigesh%2Fretoggle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Raathigesh%2Fretoggle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Raathigesh","download_url":"https://codeload.github.com/Raathigesh/retoggle/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247685628,"owners_count":20979085,"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-10-03T09:51:49.504Z","updated_at":"2025-04-07T16:17:10.619Z","avatar_url":"https://github.com/Raathigesh.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv  align=\"center\"\u003e\n\u003cimg src=\"./docs/Retoggle.png\" /\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\n\u003cimg src=\"https://img.shields.io/travis/Raathigesh/retoggle.svg?style=flat-square\" /\u003e\n\u003cimg src=\"https://img.shields.io/github/license/Raathigesh/retoggle.svg?style=flat-square\" /\u003e\n\u003cimg src=\"https://img.shields.io/npm/v/retoggle.svg?style=flat-square\" /\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\nRetoggle is a collection of React hooks which provides UI toggles to manipulate your component state from outside. Like [Storybook Knobs](https://www.npmjs.com/package/@storybook/addon-knobs). This library is inspired by [ideas from Dan Abramov](https://twitter.com/dan_abramov/status/1058834904207761409).\n\n- 🎉 A wide range of toggles\n- 💡 Frictionless integration\n- 🎨 Themeable components\n- 🎁 Extensible. Write your custom toggles.\n\n### Available knobs\n\n- 📝 `useLog()` - Keeps track of a variable value\n- 🅰 `useTextKnob()` - Shows a text box\n- 1️⃣ `useNumberKnob()` - Shows a number box\n- ✅️ `useBooleanKnob()` - Shows a check box\n- 🎚 `useRangeKnob()` - Shows a slider\n- 🎛 `useRangesKnob()` - Shows multiple sliders\n- 🎏 `useSelectKnob()` - Shows a select box\n- ⚒ `useObjectKnob()` - Shows an object editor\n- 🎨 `useColorKnob()` - Shows a color picker\n- ⏰ `useTimemachine()` - Shows a slider and tracks the state of a given variable and allows to travel back in time\n\n#### 📚 [API Docs with live preview available here](https://retoggle.netlify.com)\n\n#### 🔮 [Codesandbox Demo](https://codesandbox.io/s/kw21kn3063)\n\n### An example\n\nThe value of `state` will be displayed in the inspector component.\n\n```javascript\nimport React, { useState } from \"react\";\nimport { Inspector, useLog } from \"retoggle\";\n\nexport default function Demo() {\n  const [state, setState] = useState({ value: 5 });\n\n  // logs your state to inspector\n  useLog(\"My state\", state);\n\n  return (\n    \u003cdiv\u003e\n      \u003cInspector /\u003e\n    \u003c/div\u003e\n  );\n}\n```\n\n### Contribute\n\nPreparing dev environment\n\n- `yarn install` to install dev dependencies\n\nRunning and building the library\n\n- `yarn start` will start the dev server and expose the sample app\n- `yarn build` will output the build artifact to `./lib` folder\n\nDocs\n\n- `docz:dev` will start the docz development server\n- `docz:build` will build the docs\n\n### License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraathigesh%2Fretoggle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraathigesh%2Fretoggle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraathigesh%2Fretoggle/lists"}