Getting started
Install
Section titled “Install”npm install -D msw-panelpnpm add -D msw-panelyarn add -D msw-panelbun add -d msw-panelAdd to your app
Section titled “Add to your app”import { createMswPanelController } from "msw-panel";import { MswPanel } from "msw-panel/react";import { worker } from "./mocks/browser";
const controller = createMswPanelController({ runtime: worker });
export function App() { return ( <> <Routes /> <MswPanel controller={controller} /> </> );}That’s it. A floating button appears in the corner — click it to open the panel and toggle handlers on or off.
See the React reference for all props and defaults.