Toggle your designs in real time
- Instal package
- Ask your agent (Cursor, Codex, Claude Code) to set you up
- Ask your agent for design options for some part of you app
- See a toggle, dropdown, or slider appear in you toggletation panel
- Select the option you like, copy the prompt, give it to your agent, and they'll make the change
npm install toggletationPeer deps: React ≥ 18.
Wrap your app in TogglesProvider and drop in TogglesPanel:
import { TogglesProvider, TogglesPanel, type FieldDef } from "toggletation"
// The agent will fill this in
const fields: FieldDef[] = []
export default function App({ children }) {
return (
<TogglesProvider fields={fields}>
{children}
{process.env.NODE_ENV === "development" && <TogglesPanel />}
</TogglesProvider>
)
}The package ships with a SKILL.md — a plain-markdown file that tells AI coding assistants how to use Toggletation correctly. Copy it to the right place for your tool:
# Cursor
mkdir -p .cursor/skills/toggletation
cp node_modules/toggletation/SKILL.md .cursor/skills/toggletation/SKILL.md
# Claude
cat node_modules/toggletation/SKILL.md >> CLAUDE.md
# GitHub Copilot
cat node_modules/toggletation/SKILL.md >> .github/copilot-instructions.md
# Windsurf
cat node_modules/toggletation/SKILL.md >> .windsurfrulesOnce wired up, your agent will proactively suggest tweaks panels whenever you ask for design variants, layout options, or style alternatives.
MIT