Raathigesh/retoggle
Raathigesh/retoggle has 1,372 GitHub stars and 25 forks. GitHot measured 0 stars in 24 hours. Last checked 2026-11-07 07:17 UTC. Last push 2020-07-05.
🎨 UI controls as React Hooks to control your component state from outside
Measured star growth
- in 24h
- 0
- in 7 days
- Collecting history
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Original
Retoggle is a collection of React hooks which provides UI toggles to manipulate your component state from outside. Like Storybook Knobs. This library is inspired by ideas from Dan Abramov.
- 🎉 A wide range of toggles
- 💡 Frictionless integration
- 🎨 Themeable components
- 🎁 Extensible. Write your custom toggles.
Available knobs
- 📝
useLog()- Keeps track of a variable value - 🅰
useTextKnob()- Shows a text box - 1️⃣
useNumberKnob()- Shows a number box - ✅️
useBooleanKnob()- Shows a check box - 🎚
useRangeKnob()- Shows a slider - 🎛
useRangesKnob()- Shows multiple sliders - 🎏
useSelectKnob()- Shows a select box - ⚒
useObjectKnob()- Shows an object editor - 🎨
useColorKnob()- Shows a color picker - ⏰
useTimemachine()- Shows a slider and tracks the state of a given variable and allows to travel back in time
📚 API Docs with live preview available here
🔮 Codesandbox Demo
An example
The value of state will be displayed in the inspector component.
import React, { useState } from "react";
import { Inspector, useLog } from "retoggle";
export default function Demo() {
const [state, setState] = useState({ value: 5 });
// logs your state to inspector
useLog("My state", state);
return (
<div>
<Inspector />
</div>
);
}
Contribute
Preparing dev environment
yarn installto install dev dependencies
Running and building the library
yarn startwill start the dev server and expose the sample appyarn buildwill output the build artifact to./libfolder
Docs
docz:devwill start the docz development serverdocz:buildwill build the docs
License
MIT
Explore related projects
codecrafters-io/build-your-own-x
Master programming by recreating your favorite technologies from scratch.
560,650 starspublic-apis/public-apis
A collective list of free APIs
496,899 starsmorluto/rea
Reverse engineer anything with agents, from app behavior down to native binaries.
439,840 starsopenclaw/openclaw
The AI that really does things. Any OS. Any Platform. The lobster way. 🦞
394,107 stars