# knobs
> knobs is a dev-only panel inside the page that shows your site on an iPhone or a Pixel, tomorrow morning, in Arabic or in dark mode.
It emulates devices, locales, time, color schemes, network and motion settings from inside the page. Grab hands a coding agent an element with its html, components and source places, and an agent api lets a browser tool drive the knobs. A Chrome extension puts the same panel on any site and sets some knobs for real.
- [npm](https://www.npmjs.com/package/@vinena/knobs): the @vinena/knobs package
- [Chrome Web Store](https://chromewebstore.google.com/detail/knobs/cpdmafeojnbdnnhldafobkaajiemcidj): the knobs extension
- [GitHub](https://github.com/vinenastudio/knobs): the source of the package, the extension and this site
## Reference: start
Install @vinena/knobs, mount it in development only, and load the early script where the page needs it.
knobs is a dev-only panel for flipping browser preferences from inside the page. one script tag and the knobs are there. no css to add, no code to change. zero runtime dependencies.
### two ways to use it
- **the npm package, in your app.** you add `@vinena/knobs` to the project and mount it in development only. the knobs are emulated inside the page, in any browser. the rest of this page sets it up.
- **the chrome extension, on any site.** it puts the same panel on every page you open, with some knobs set for real by the browser, no code changed. see [chrome extension](https://knobs.dev/docs/extension).
### install
with an ai agent: paste this setup prompt into claude code, codex or cursor, and it installs @vinena/knobs and mounts it in development only. it is the copy installation prompt button on the home page and at the top of /docs/start too.
```
Read https://knobs.dev/llms-full.txt first: it is the full knobs reference. Then install @vinena/knobs in this project. It is a dev-only panel that emulates browser preferences from inside the page.
1. Detect the package manager from the lockfile and add @vinena/knobs as a dev dependency (npm i -D @vinena/knobs, or the pnpm, yarn or bun equivalent).
2. Mount it once, on the client, in development only:
- Next.js: make a small client component (the file starts with "use client"). In it, import dynamic from "next/dynamic", then const Knobs = process.env.NODE_ENV === "development" ? dynamic(() => import("@vinena/knobs/react").then((m) => m.Knobs), { ssr: false }) : null; and render {Knobs &&
` or an svg path, opens in a field that keeps them, where ↩ breaks the line, and `⇧↩` (`Shift Enter` off a Mac) or its `apply` button puts it on the page - `a` on the selected line adds an attribute, in a field before the tag's end - `F2` edits the element as html: an editor with its outer html, in the panel's monospace, its lines numbered and its tags, attributes, values and comments colored. ↩ breaks the line with the line's indent, one level more after an opening tag, and between a tag and its end tag puts the end on a line of its own. `>` after `` after the caret (not for a void element such as `` or `
`), and `"` after `=` in a tag writes the closing quote too, which typing it steps over. the grip under the editor drags its height, and `expand` makes it as tall as the panel (`shrink` makes it as it was); both are kept for the next time. `⇧↩` (`Shift Enter` off a Mac), its `apply` button, or a click elsewhere puts the new html in the element's place and selects it; esc leaves it. html with no element in it, or with knobs' own `data-knobs` or `data-devknobs` attributes, is refused: applying it with `⇧↩` or the button turns the field red and keeps it open, while a click elsewhere closes it without the edit. undo puts the very element back, unless the page moved the new nodes since - `h` hides the selected element and all in it, and shows it again: `visibility: hidden` through an attribute of knobs', so the page's own `style` stays as it is. its line goes faint - Delete or Backspace deletes the selected node, and the line after it is selected. undo puts it back where it stood - `⇧↑` and `⇧↓` (`Shift Up` and `Shift Down` off a Mac) move the selected element before the element above it or after the one below it, among the elements in its parent; texts between them stay where they are. a ` ``` with a bundler: ``` if (import.meta.env.DEV) import('@vinena/knobs').then(({ mount }) => mount()); ``` in react, render `` from `@vinena/knobs/react` once, in development only. it renders nothing and mounts the knobs on its first effect. a static import stays in the production bundle even behind a dev check, so in next.js load it with `dynamic()` behind the check. #### open it press `⇧K` or click the handle on the right edge of the window. in the open panel, `/` searches the knobs and `⇧G` grabs an element. see [the panel](https://knobs.dev/docs/panel). the knobs live in `sessionStorage`, so they survive reloads and go away with the tab. #### early script a page that reads a media query, the time or the user agent while it boots, before knobs mounts, only sees the knob if the patch is already in place. put this first in ``, in development only: ``` ``` #### from code `mount()` and ` ` take options such as `hotkey`, `open` and `persist`. the api sets knobs too: `setState({ scheme: 'dark' })`, `reset()`, `getState()`. agents get `describe()` and `ready()`, see [agents](https://knobs.dev/docs/agents). ## The knobs panel: open, move, search and pin your knobs URL: https://knobs.dev/docs/panel ### the panel #### open and move it the panel starts closed, as a handle on the right edge of the window. click it or press `⇧K` to open it. it stays open across reloads. - drag the handle to move the panel along the edge, or past the middle to the other side. - drag the panel's inner edge to change its width, from 240px to 720px, or less in a narrow window. it starts at 320px, and a double click on the edge puts it back. #### rows and search the panel lists the knobs that are off their default, one row each. click a row to open its editor, `×` puts it back to its default, and holding `×` for a second takes the row off. drag a row by its six dots to move it. the add knob button opens a search. type `dark`, `390`, `+2d`, `tokyo` or `offline`, and enter sets the first result. #### keys while the panel is out and the focus is in no field: | key | what it does | | --- | --- | | `⇧K` | opens and closes the panel | | `/` | opens the search | | `⇧G` | grabs an element, see [grab](https://knobs.dev/docs/grab) | | `⇧R` | replays the page's animations | | `⇧N` | shows the [requests](https://knobs.dev/docs/requests-and-storage) | | `⇧S` | shows the [storage](https://knobs.dev/docs/requests-and-storage) | | `⇧E` | shows the elements view, see [inspect](https://knobs.dev/docs/grab#inspect) | | `⇧O` | shows the settings | | `⇧` backspace | resets every knob | `⇧N`, `⇧S`, `⇧E` and `⇧O` open the panel where it is closed, and the same key again leaves the view. every other key goes to the page. the gear in the footer opens the settings, where you can change every key but `/`, to any key or combination, a key alone too, and hide the handle. the browser's own keys and a key another shortcut has are refused. with the extension, the keys you set are the same on every site. the dev tab icon switch there puts a `DEV` ribbon on the tab's icon: on local hosts only by default, or on any host or none, for this tab. turned off or unmounted, the page has its own icons back. with the extension, the real phone mode switch sends the device's user agent with the frame's page loads, so sites serve their mobile site; some sites may sign you out. it is one setting for every tab and site. #### pinning the pin button in the footer docks the panel to its side, the way devtools dock. the page gets narrower for real, so media queries and fixed boxes follow. press it again to float the panel. #### fresh mode add `knobs=fresh` to the address to see the page and the panel as a first visit does. nothing is kept while it is on. ``` http://localhost:3000/?knobs=fresh ``` ## Every knobs knob: dark mode, locale, time zone and more URL: https://knobs.dev/docs/knobs ### knobs every knob and what it does. search finds them by name or value, see [the panel](https://knobs.dev/docs/panel). #### look and motion | knob | what it does | | --- | --- | | [color scheme](https://knobs.dev/use/dark-mode) | light or dark, in your css and in `matchMedia` | | [reduced motion](https://knobs.dev/use/reduced-motion) | `prefers-reduced-motion: reduce` | | animation speed | runs animations at 0.25 or 0.1, or pauses them | | contrast | `prefers-contrast: more` | | reduced transparency | `prefers-reduced-transparency: reduce` | | text size | the browser's default font size | | text spacing | the wcag 1.4.12 text spacing values | | [vision](https://knobs.dev/use/color-blindness-simulator) | a color blindness filter or a blur | | replay animations | `⇧R` runs every animation again | #### locale, place and time | knob | what it does | | --- | --- | | [locale](https://knobs.dev/use/rtl) | any language tag and a direction, `Intl` included | | [pseudo](https://knobs.dev/use/pseudolocalization) | turns the page's text into `[Ŝéţţîñĝš ···]` | | [geolocation](https://knobs.dev/use/fake-geolocation) | a city, your own coordinates, or a route | | geo error | denied, unavailable or timeout | | [time zone](https://knobs.dev/use/time-zone) | any iana zone, or the geo city's zone | | [clock](https://knobs.dev/use/time-zone) | jump ahead, pick a date, freeze it, or speed it up | #### browser and debug | knob | what it does | | --- | --- | | online | the page reads offline, requests still succeed | | connection, save data | `navigator.connection` reads 2g to 4g, chromium only, no throttling | | [user agent](https://knobs.dev/use/user-agent-switcher) | iphone safari, googlebot, or your own string | | requests, storage | `⇧N` and `⇧S` show what the page sent and stored | | overflow | finds the boxes that scroll the page sideways | | outlines | outlines every element | | grab color | the color of [grab](https://knobs.dev/docs/grab)'s boxes | #### viewport and device these put the page in a frame, a real viewport, so media queries and `vw` follow. see [devices](https://knobs.dev/docs/devices). | knob | what it does | | --- | --- | | [viewport width, height](https://knobs.dev/use/window-sizes) | a size in px | | [device, orientation](https://knobs.dev/use/mobile-simulator) | a phone, tablet or laptop, turned | | posture | folds a foldable | | mock, browser, bars | the phone's body and its browser | | edge to edge | the page under Safari's top row, sideways | | touch pointer | the mouse acts as a finger | | device pixel ratio | 1, 2 or 3 | | frame, zoom, mat | the frame alone, its zoom, the mat's color | #### the clock and your server turn on "send to server" and `fetch` and `XMLHttpRequest` calls to the page's own origin carry the clock's time. the first page load does not. read it on your server: ``` const now = (request: Request) => { const header = process.env.NODE_ENV === 'development' ? request.headers.get('x-knobs-now') : null; return header ? new Date(header) : new Date(); }; ``` never honor the header in production. any client can send it. ## Device presets in knobs: iPhone, Pixel, iPad and laptop URL: https://knobs.dev/docs/devices ### devices #### pick a device the device knob sets a size, a ratio and a touch screen in one pick. the presets come in six families: - iPhone, such as iPhone 18 Pro (402 × 874) and iPhone SE (375 × 667) - Pixel, such as Pixel 10 (412 × 924) - iPad, such as iPad mini (744 × 1133) - MacBook Air 13 (1470 × 956) - laptop (1366 × 768) and desktop (1920 × 1080) the panel's device list has them all, and search finds them by name, kind or platform, such as `pixel` or `tablet`. #### landscape and custom sizes `landscape` turns the frame. type a size such as `390x844` for a custom one. #### mocks, bezels and the phone's browser a phone or tablet comes up in a mock of its body: the glass, the island or punch hole, the buttons. every iPhone and Pixel wears its maker's own bezel. the mock switch in the device editor turns it off. a phone also shows the page in its browser: Safari's bars on an iPhone, Chrome's toolbar on a Pixel. the browser knob picks the layout, or off for the whole screen, and the bars minimize as the page scrolls. #### touch and the user agent a touch device gets a touch screen inside its frame: `(pointer: coarse)` matches, and the mouse acts as a finger, with a round dot for a cursor. a press scrolls and flings, and a tap clicks. a device sets the user agent to its own browser too. the frame reloads when a pick changes the user agent, the touch screen or the ratio. #### the iPhone Duo the iPhone Duo folds. it comes up closed on its cover screen, and `unfold` and `fold` in the device row open it onto its inner screen and shut it again, with the fold drawn in view. ## Grab and inspect elements for a coding agent with knobs URL: https://knobs.dev/docs/grab ### grab and inspect #### grab press `⇧G` (`Shift G` off a Mac), hover an element and click it. its html, the components that rendered it and where they live go on the clipboard: ``` [ in SaveButton (at src/App.jsx:5:5) in App (at src/App.jsx:28:7)] ``` paste that into your agent and it can find the code. - drag a box, or shift and a click, to gather several elements. each gets a number, and a tray at the bottom lists them, with one note for them all. `n` writes the note. - enter, `c` or the tray's copy button copies them all, numbered, the note last. - the arrows move to the parent, a child or a sibling. - escape or `⇧G` again turns grab off. ``` 1. [ in SaveButton (at src/App.jsx:5:5)] 2. [Docs in Nav (at src/Nav.jsx:12:9)] Note: same spacing for all of these ``` for a file, a line and a column on every component, React needs a devtools hook from its first render: the React devtools extension, or the [early script](https://knobs.dev/docs/start). #### change the key ``` mount({ grabKey: 'alt+shift+g' }); ``` `grab: false` leaves grab out. `grab(elements)` copies elements from code. #### send each grab every grab also fires one `knobs:grab` event on `window` as the copy starts, with what it copies as its `detail`: ``` window.addEventListener('knobs:grab', (event) => { console.log(event.detail.content, event.detail.entries, event.detail.note); }); ``` `grabSend` sends each grab somewhere too, so nobody has to paste. a URL gets a POST of `{ "type": "knobs.grab", "payload": ... }` as json; it has to be the page's own origin, or http(s) on `localhost`, `127.0.0.1` or a `.localhost` name. a function gets the payload: ``` mount({ grabSend: '/api/grab' }); mount({ grabSend: (payload) => socket.send(JSON.stringify(payload)) }); ``` with the script tag, set it on the tag: ``` ``` the copy still happens. the toast says `Copied · Sent` once it went, and `Send failed` when it did not. #### coming from react-grab knobs has the same grab, the same line format and the same clipboard type. remove `react-grab`, mount knobs, and pass `grabKey: "meta+c"` (`"ctrl+c"` off a Mac) to keep react-grab's key. #### inspect press `⇧C` (`Shift C` off a Mac) and click an element to see its css in the panel, as the browser's Elements panel shows it: - the DOM tree on top, the element selected, with its breadcrumbs under it - its box: margin, border, padding and content, with their sizes - its styles, in `simple` mode (what applies) or `advanced` (every rule, in cascade order) while you pick, the box is drawn on the page in the browser's colors, and a card shows the color, font, contrast and spacing. click a value to edit it, the checkbox at a line's start turns it off and on, and `+ add property` adds one. as you type a name or a value, a list suggests what the browser takes: every property it knows and the page's custom properties, then for a value its keywords, named colors and `var(--x)`; an empty field shows the whole list. ↑ and ↓ pick one, ↩ or Tab takes it, or the first where it completes what you typed (Tab in a name goes on to the value), and esc closes the list. the changes at the foot count the edits, `changes (N)`: click it to show each edit as `-` and `+` lines, and it stays as you leave it. `Z` undoes and `⇧Z` (`Shift Z` off a Mac) redoes while the focus is in the view and not in a field (⌘Z and Ctrl Z do not), and `copy prompt for agent` copies a prompt that asks your agent to put them in the code. `+ new rule` adds a rule for the element, its selector from the element's classes. the chips `:hover`, `:focus`, `:focus-visible`, `:active` and `:focus-within` over the rules force a state: each makes the page draw the element in that state, and the styles show the rules of that state as applying. a forced state is no edit, and it ends when you pick another element or close the view. the DOM tree can be edited too: double-click a text or an attribute to edit it, and on the selected line `a` adds an attribute, `F2` edits it as html, `h` hides it, Delete deletes it and `⇧↑` / `⇧↓` move it among its siblings, or use the bar under the tree. the html editor colors the html and numbers its lines; ↩ keeps the indent, `>` closes the tag, `⇧↩` applies and esc leaves. drag the grip under it to resize it, or click `expand` to give it the panel's height. drag an element's line by its handle, `⋮⋮`, to move it before or after another element, or into one. those edits go into the same changes, and the prompt asks your agent to change the component, as a re-render may undo an edit of the DOM. ``, `` and `` and knobs' own nodes and attributes cannot be replaced, hidden, deleted or moved. the switch `keep edits after reload` in the panel's settings keeps the edits for the page: after a reload they are made again where the page still has them, and the changes say how many came back and which could not be found. it is off at first, and off forgets them. html and attribute edits are never made on load: they wait in the changes until you click `apply`, as a page script could have planted them, and one that could run a script is never made. a page keeps its first 200 edits, up to 256 KB, for 20 pages at most; forced states are never kept. edits made in knobs' frame, for a pinned panel or a device, are kept while it shows the same page, and made again in the frame after a reload. kept edits hold the page's text, attribute values and markup as edited. with the npm package they are in the page's `localStorage`, with the extension in its own storage. ## See network requests and edit storage with the knobs panel URL: https://knobs.dev/docs/requests-and-storage ### requests and storage #### requests press `⇧N` (`Shift N` off a Mac) to see what the page asks for: a row a request, the newest on top, with its method, name, status and time. filter by address, method or status. click a row to open it, laid out as Chrome DevTools' network panel: | tab | shows | | --- | --- | | Headers | general, response and request headers | | Payload | query string, request payload, form data | | Preview | json as a tree, images, html | | Response | the body as text | | Initiator | the call stack that made the request | | Timing | queueing, connection, waiting, download | copy puts a request on the clipboard as plain text, ready for an AI chat. secret looking headers and parameters are copied as ` `, but bodies are copied as they are, so check before you paste. #### what gets recorded `fetch` and `XMLHttpRequest` are seen whole. an `EventSource` is a row with its messages. images, scripts and other things the page loads get timing and sizes only. the last 300 requests stay in memory, and nothing is sent anywhere. load the [early script](https://knobs.dev/docs/start) to catch the page's first request. #### storage press `⇧S` to see what the page keeps in the browser, as one tree: - local storage and session storage: read, edit, add and delete - cookies: the ones the page can read, editable - IndexedDB and cache storage: read only one filter works over every table. clear site data empties it all after one question. knobs' own keys are hidden and kept. #### presets save as preset keeps the storage items and cookies the filter shows, under a name. apply one with a press, or turn on apply on load to set it on every load. export and import them as json to share with teammates. ## Drive knobs from a coding agent with Playwright or MCP URL: https://knobs.dev/docs/agents ### agents #### drive the knobs a coding agent can drive the knobs through any browser tool that runs js in the page, such as playwright's `page.evaluate` or the chrome devtools mcp's `evaluate_script`, and fix what breaks. - `describe()` lists every knob as json: its key, the values it takes, its default, and what applying it reloads: `none`, `frame` or `page`. - `setState()` throws a `TypeError` at a value the state does not take, and then changes nothing. `setState(getState())` takes the whole state back. - `ready()` resolves with the state once the page has caught up with the knobs. it rejects when knobs is not mounted, and past 10 seconds, so a timeout never passes for success. - [`grab()`](https://knobs.dev/docs/grab) takes an element, an array or a NodeList of them. - `edits()` gives the style and html edits made in inspect's view as json, to put in the code, a new rule (`css-rule`) and a moved element (`move`) included. `setEdits(list)` makes such a list again on a fresh load, where the page still has each edit's target and value before, and resolves to `{ applied, skipped }`; `undoEdit()` undoes the last one. it makes html and attribute edits at once, but never one that could run a script (`could run a script`), and after a delete, move or html edit that was not made, it skips every later one. - `forceState(element, ['hover'])` makes an element render as hovered, focused or pressed, for a screenshot; `forceState(null)` ends it. - `reset()` sets the knobs back and leaves the panel as it is. ``` window.knobs.setState({ scheme: 'dark', panel: { open: false, handle: false } }); await window.knobs.ready(); ``` every way in puts the api on `window.knobs` while knobs is mounted: the script tag, `mount()` and ` `. so does the copy inside the width knob's frame, and the [chrome extension](https://knobs.dev/docs/extension) on any page it runs on. where `window.knobs` is not knobs' api (the page has a `knobs` of its own, or knobs is older than 0.7.1, such as an extension not yet on 0.7.1), use `window.devknobs`, which every copy sets. #### the agent skill the package ships an agent skill that walks an agent through the loop: learn the knobs, set a condition, wait, check the page, grab what is broken, fix it, reset. it is at `node_modules/@vinena/knobs/skills/knobs/SKILL.md` ([on GitHub](https://github.com/vinenastudio/knobs/blob/main/packages/devknobs/skills/knobs/SKILL.md)). copy it into the project's skills to install it, for claude code: ``` mkdir -p .claude/skills && cp -R node_modules/@vinena/knobs/skills/knobs .claude/skills/ ``` ## knobs Chrome extension: the knobs panel on any website URL: https://knobs.dev/docs/extension ### chrome extension #### what it does the same knobs panel on any page you open, with no change to the site's code. the toolbar button opens it, and closing it from there turns knobs off for the tab: every knob back to its default, and a page loaded as another browser loads again. Chrome and Edge only. #### install install it from the [chrome web store](https://chromewebstore.google.com/detail/knobs/cpdmafeojnbdnnhldafobkaajiemcidj). it works in Chrome and Edge. tabs open before the install get the panel at their next load. #### with the npm package the npm package is for your own app, in any browser. the extension is for any site, in Chrome and Edge. if the page runs knobs too, the extension's panel wins, and the page's calls such as `setState` go to it. to try a local build of knobs on your own site, set prefer to page in the panel's settings: the page's copy then runs the panel, with real browser settings off. it needs a page copy newer than 0.5.1 or a local build, and applies to every site in the Chrome profile. the panel's footer says which copy runs it. the edits the Elements view keeps after a reload are in the extension's storage, per page, not in the page's `localStorage`, unless the page's own copy runs the panel (prefer page), which keeps them in the page's `localStorage`. a page script can change them for a short time after you click or press a key on that page, so kept html and attribute edits wait for your click on `apply` in the panel. turn the view's switch off to forget a page's edits; clearing the site's data does not. #### what Chrome sets for real the npm package fakes every knob inside the page. the extension hands these to Chrome instead: - text size: `rem`, `em` and em media queries all follow, with no jump after paint. - offline: requests really fail. - the preferences: color scheme, contrast, reduced motion and reduced transparency. - viewport: a plain size, or a device with no mock or browser drawn around it, becomes the tab's own viewport, with no reload. - user agent: the one you pick in the ua knob goes to the tab's own host, so servers see it too. a device in the frame sends none, so no site signs you out; the frame's page still reads the device's browser. turn on "real phone mode" in the panel's settings to send it with the frame's page loads, so sites serve their mobile site; some sites may sign you out. while text size, offline, a preference or the viewport is set, Chrome shows its "started debugging this browser" bar. to avoid it, turn off "real browser settings" in the panel's settings, and those knobs work in the page as with the npm package. the user agent still reaches servers. #### permissions - `debugger`: the knobs set for real. - `declarativeNetRequestWithHostAccess` and ` `: the user agent and framing rules. - `offscreen`: reads your own scheme and motion. - `storage`: each tab's knobs, the real or in-page switch, and the edits pages keep after a reload. - `webNavigation`: drops framing rules when a tab loads another page, and sees the width knob's frame sent to another host of the same site. pages that refuse frames still load in the width knob's frame: while it is open, the extension removes `X-Frame-Options` from that tab's frame loads of the page's host, and `Content-Security-Policy` where its `frame-ancestors` leaves the page out. a site that sends the frame's first load to another host of its own, such as its mobile one for a phone, takes the tab there, with your knobs. later loads sent elsewhere get the notice. ## knobs limits and FAQ: what a page panel cannot fake URL: https://knobs.dev/docs/limits ### limits and faq knobs works from inside the page, so some things stay out of its reach. #### main limits - only same-origin stylesheets can be rewritten. a cross-origin `` keeps its real media behaviour. - a `MediaQueryList` made before knobs mounted gets no change event. reload, or load the [early script](https://knobs.dev/docs/start) first. - the time zone and the clock live in the page. workers, service workers and the server keep the real ones. - the clock moves the time a page reads, not the time that passes. timers keep real time. - the user agent knob changes what page code reads. the server still sees the real `User-Agent`, unless you use the [extension](https://knobs.dev/docs/extension). - the speed knob slows what the Web Animations API sees. a `requestAnimationFrame` loop keeps its own pace. - the touch pointer is made in the page. css `:hover` still follows the mouse, and there is one finger only, with no pinch. - the phone's browser bars do not open their menus, and there is no keyboard. - the phone's browser gives the page Safari's real viewport, but `100svh`, `100lvh`, `100vh` and `clientHeight` follow the frame's height. under the bars the screen is one solid color, not the page itself. edge to edge only works with the phone held sideways. - the frame loads the page a second time, so in-memory state is not shared between the two. #### what only devtools can do - device pixel ratio outside chromium - `forced-colors`, high contrast and print media - trusted touch events and pinch - network throttling and a real offline - the time zone of workers #### faq does it ship to production? not unless you put it there. gate the import itself, since a static import stays in the bundle even behind a dev check. see [start](https://knobs.dev/docs/start). does it need react? no. it is vanilla typescript with zero runtime dependencies. react only adds component names to [grab](https://knobs.dev/docs/grab). does it send data anywhere? no. there is no analytics and no telemetry. see [privacy](https://knobs.dev/docs/privacy). why does my page load twice? the width, height, device and some other knobs render the page in a same-origin frame, which loads it again. ## knobs privacy: what the panel, extension and site collect URL: https://knobs.dev/docs/privacy ### privacy #### the npm package knobs has no analytics and no telemetry, and it sends nothing about you or your page anywhere, but for the page address in send feedback (below). the few requests it makes for itself, such as device images and source maps for grab, never leave the page's origin or the host knobs' script came from. send feedback is the one link that does. - the requests view keeps the last 300 requests in memory. nothing is stored or sent. - what you copy goes to your clipboard and nowhere else. - send feedback opens our feedback page (feedback.vinena.studio) in a new tab with the current page address attached, without its query or fragment; that address reaches us only when you send the feedback. - the clock's "send to server" switch, off at first, adds an `x-knobs-now` header, and the old `x-devknobs-now`, to calls to the page's own origin only. - it keeps its settings in your browser, for the page's origin: the knobs under `knobs` and a few `knobs:` keys (scroll position, locale and reload notes, the last frame's look) in `sessionStorage`, and `knobs:` keys such as the panel's settings, place, shortcuts, colors and storage presets in `localStorage`. each is written under its old name too, `devknobs` or `devknobs:`, and the old name is the one knobs reads. while `keep edits after reload` is on for a page, its edits are there too, under `knobs:edits:` and its path: the page's text, attribute values and markup as edited, up to 64K characters each, at most 200 edits and 256 KB per page, until you turn the switch off or the page is forgotten past 20 pages. forced states are never kept, and edits made in knobs' frame are kept only if it showed the same page (its origin and path) as they were made, and are stored as long as the page's own. kept html and attribute edits are never made on load without your click on `apply`, as a page script could plant them. - the locale knob writes the language into the stores i18n libraries read: the paraglide cookie always, the paraglide and i18next `localStorage` keys and the i18next `sessionStorage` key and cookie only when the page already has them, and `NEXT_LOCALE` on next.js pages or when that cookie exists. it gives each its old value back when you set it to system, within the same tab session only. #### the chrome extension the extension's own code makes no network requests. its device images ship inside it. the panel is knobs, so it loads what the npm package loads, from the page. - session storage, cleared when Chrome closes: each tab's knobs, which host has knobs' frame open in each tab, and each tab's user agent with its page's host. - local storage: the real or in-page switch, and a page's edits while its `keep edits after reload` switch is on, in the extension's own storage and not the page's, at most 200 edits and 256 KB per page, until you turn the switch off or the page is forgotten past 20 pages; clearing the site's data does not remove them. forced states are never kept, and edits made in knobs' frame are kept only if it showed the same page (its origin and path) as they were made, and are stored as long as the page's own. they are written only in the short time after a click or key press of yours on that page, which a page script can use too. html and attribute edits wait for your click on `apply`, and none that could run a script is kept or made. - the panel it puts on a page keeps the same `knobs` and `knobs:` keys in that page's own storage as the npm package does. Chrome's debugger attaches only when you ask for something that needs it, and Chrome shows its bar while it is on. while on, it notes the last few loads of the tab's frames in memory, to say why a frame was refused: the address, redirects, the status, the headers that bear on framing, the `sec-fetch` values sent, why a load failed, and Chrome's console lines about it. to read the `sec-fetch` values it keeps the headers of up to 50 recent requests in memory, cookies and authorization included. those headers are never stored or sent. when a frame is refused, the extension hands the record of that load to the panel in the page, which shows it under the notice, and "copy details" puts it on your clipboard. servers see another user agent only while you set the ua knob yourself or a device makes the whole tab (nothing drawn around it, in real mode); a device in the frame sends none, unless you turn on real phone mode. response headers change only while knobs' frame is open. see [chrome extension](https://knobs.dev/docs/extension) for the permissions. #### knobs.dev only knobs.dev counts visits, with a self-hosted [OpenPanel](https://openpanel.dev/) through the site's own `/api/op`. it records page views, link and button clicks, and the tour's progress. the proxy hands your IP address and user agent to the analytics server, and no cookies. the server logs each request's method, path, status and duration, the Cloudflare request id, and the country, network and data center Cloudflare reports. it logs no IP address, no user agent and no cookies. four of the demo's request buttons leave the site on purpose, and only when pressed: two ask `https://example.com/`, and two ask `https://demo.invalid/`, which never resolves. the demo panel is knobs itself, so it keeps the same `knobs` keys in your browser as above. the site keeps the `PARAGLIDE_LOCALE` cookie for 400 days, `knobs:tour` in `localStorage`, and the storage demo's data only when you press its buttons. questions go to the [GitHub issues](https://github.com/vinenastudio/knobs/issues). ## How to test dark mode, time zones and RTL on your site URL: https://knobs.dev/blog/test-dark-mode-time-zones-rtl ### How to test dark mode, time zones and RTL on your site Updated October 29, 2026 To emulate dark mode, open Chrome DevTools, open the Rendering tab, and set **Emulate CSS media feature prefers-color-scheme** to dark. To change the time zone, give a location a Timezone ID in DevTools Settings > Locations and pick it in the Sensors panel. To test right-to-left, set `dir="rtl"` on the `` element. None of these changes your system settings. Each one applies only to the tab you are inspecting. Below are the exact steps as of October 2026, how to put the same conditions in automated tests, and what each method misses. #### Dark mode: emulate prefers-color-scheme Sites switch to dark styles with the `prefers-color-scheme` media query. You can make a tab report dark without changing your system theme. ##### Chrome and Edge 1. Open DevTools: Command+Option+I on a Mac, Ctrl+Shift+I on Windows and Linux. 2. Press Command+Shift+P (Ctrl+Shift+P) to open the Command Menu, type `rendering`, and choose **Show Rendering**. Or press Esc to open the Drawer and choose **More Tools > Rendering**. 3. Scroll to **Emulate CSS media feature prefers-color-scheme** and pick `prefers-color-scheme: dark`. CSS media rules update at once. A script that read `matchMedia('(prefers-color-scheme: dark)')` only at page load will not see the change, so reload the page. Google's guide also says to reload. The same Rendering tab has the neighbors you will want next: `prefers-reduced-motion`, `prefers-contrast`, `forced-colors` (a stand-in for Windows high contrast) and **Emulate CSS media type** set to print. ##### Firefox In the Inspector, the Rules view toolbar has two buttons that simulate the light and the dark color scheme for the page. The **@** button next to them opens the full emulation panel, which also simulates print media. If `privacy.resistFingerprinting` is on, Firefox forces light, so turn it off to test dark. ##### Safari In Web Inspector's Elements tab, the toggles at the top right of the main area include **Override user preferences**. It opens a popover where you set the color scheme, reduced motion and increased contrast. The overrides last while Web Inspector is open. The **Force print media styles** toggle sits next to it. ##### What to check in dark mode - Images and logos with a transparent background on a dark page. - Form fields, scroll bars and native controls: set `color-scheme: light dark` on `:root`, or they stay light. - Colors set in JavaScript, charts and canvas, which media queries do not reach. - Third-party embeds, which follow their own rules. - Text contrast in both themes, not only the one you designed first. #### Time zones and locale Dates break at time zone edges: a deadline that shows as "tomorrow" in Tokyo, a calendar day that moves at midnight, a daylight saving week. You can test them without changing your computer's clock. ##### Chrome DevTools: Sensors Chrome sets the time zone and the locale together with a location. 1. Open DevTools, then click the gear (Settings) and choose **Locations**. 2. Click **Add location**. 3. Fill in **Location name**, **Latitude**, **Longitude**, **Timezone ID** (an IANA name such as `Asia/Tokyo` or `America/New_York`) and **Locale** (a BCP 47 tag such as `ja-JP` or `ar-EG`). 4. Click **Save**. 5. Press Command+Shift+P, type `sensors`, and choose **Show Sensors**. 6. In the **Location** list, pick your new location. Now check it in the Console: ``` Intl.DateTimeFormat().resolvedOptions().timeZone; // "Asia/Tokyo" new Date().toString(); // local time in Tokyo ``` Limits: - It changes what the page reads, not the time itself. To test "next Monday" you still need to move the clock, which DevTools does not do. - Your server keeps its own zone. A date that the server renders will not move. - The Locale field overrides the locale that `Intl` formatting uses. Check what else follows it on your page: run `navigator.language` in the Console before you rely on it. ##### Your operating system To test the whole browser and every tab, change the zone on the computer. On a Mac: System Settings > General > Date & Time, turn off **Set time zone automatically using your current location**, then choose a city. Remember to turn it back on. #### Right-to-left layouts Arabic, Hebrew, Persian and Urdu read right to left. A layout that looks right in English can put icons, margins and arrows on the wrong side. ##### Flip the direction by hand Browsers have no "emulate RTL" switch. You flip the page yourself: 1. Open DevTools and go to the Elements panel. 2. Double-click the `` tag's attributes and add `dir="rtl"`. Or in the Console: ``` document.documentElement.dir = 'rtl'; document.documentElement.lang = 'ar'; ``` The direction holds until the page reloads or your framework writes `dir` back. If your app sets `lang` and `dir` from its own locale, switch the app's locale instead, so you test the real path. ##### What to check in RTL - Spacing written with `margin-left` and `padding-right` instead of logical properties (`margin-inline-start`, `padding-inline-end`). Physical properties do not flip. - Icons with a direction, such as arrows, "back" and "next", which should mirror. Icons like a clock or a play button should not. - Horizontal carousels and scroll positions, which start on the right. - Numbers, phone numbers, code and URLs inside RTL text, which stay left to right. - Text truncation, `text-align: left` that should be `start`, and focus order. A direction flip with English text finds most layout bugs. Real Arabic or Hebrew text also tests fonts, line height and length. A pseudo-locale, where every string is padded and accented, finds text that is not translated at all. #### The same conditions in automated tests For tests that run on every change, set these per browser context. In Playwright: ``` const context = await browser.newContext({ colorScheme: 'dark', timezoneId: 'Asia/Tokyo', locale: 'ar-EG', }); ``` Playwright's docs say `locale` "emulates the browser locale" and `timezoneId` "emulates the browser timezone", not the test runner's. Playwright does not set `dir`; your app has to do that from the locale, which is what you want to test. Playwright's `page.clock` moves the time for date tests. #### Where knobs fits The steps above are spread across the Rendering tab, a settings page, the Sensors panel and the Console. We make [knobs](https://knobs.dev/), an open source, dev-only panel inside your page that puts them in one place and keeps them across reloads. - **Color scheme.** Light or dark, in your CSS, in `matchMedia` and in `light-dark()`, next to reduced motion, contrast and text size. - **Locale and direction.** Any language tag with a direction. It sets `lang` and `dir` on ``, patches `navigator.language`, makes the tag the default for `Intl`, and writes the tag into the stores that common i18n libraries read (paraglide, i18next, `NEXT_LOCALE`), so your app switches its own language too. - **Time zone and clock.** Any IANA zone, and a clock you can move ahead, freeze or speed up, so "tomorrow 9 AM in Tokyo" is one search away. With "send to server" on, requests to your own origin carry the clock's time in a header your dev server can read. - **Agents.** A coding agent can set `{ scheme: 'dark' }` or a locale through `window.knobs.setState()`, wait with `ready()`, and check the page. See [agents](https://knobs.dev/docs/agents). It has limits: the zone and the clock live in the page, so workers and your server keep the real ones, and `forced-colors` and print still need DevTools. [Limits and FAQ](https://knobs.dev/docs/limits) lists them all. Add it with `npm i -D @vinena/knobs` and mount it in development only, see [start](https://knobs.dev/docs/start), or use the [Chrome extension](https://knobs.dev/docs/extension) on any site. To check the same page at phone sizes, see [how to test your website on mobile devices](https://knobs.dev/blog/test-website-on-mobile-devices). #### FAQ ##### How do I emulate dark mode in Chrome? Open DevTools, press Command+Shift+P (Ctrl+Shift+P on Windows), run Show Rendering, and set Emulate CSS media feature prefers-color-scheme to dark. The page's dark styles apply to that tab only, and your system setting stays as it is. ##### How do I change the time zone in Chrome DevTools? Add a location in DevTools Settings > Locations with a Timezone ID such as Asia/Tokyo, then pick it in the Sensors panel's Location list. The page's Date and Intl now use that zone, in that tab only. ##### How do I test a right-to-left layout? Set `dir="rtl"` on the `` element, in the Elements panel or with `document.documentElement.dir = 'rtl'` in the Console. Then check margins, icons, carets and scroll direction. Real Arabic or Hebrew text also tests fonts and line height, which a direction flip alone does not. ##### Can I test dark mode without changing my system settings? Yes. Chrome, Edge and Firefox DevTools each emulate `prefers-color-scheme` per tab. In automated tests, Playwright's `colorScheme` option does the same per browser context. Your Mac or Windows theme stays as it is. ##### Does the DevTools time zone override affect my server? No. It changes what the page's JavaScript reads. Your server still runs in its own zone, so dates the server renders or computes keep the real time zone. To test both, set the server's zone too, for example with the TZ environment variable. #### Sources - Chrome for Developers: [Rendering tab overview](https://developer.chrome.com/docs/devtools/rendering), [Emulate CSS media features](https://developer.chrome.com/docs/devtools/rendering/emulate-css), [Custom locations](https://developer.chrome.com/docs/devtools/settings/locations), [Sensors](https://developer.chrome.com/docs/devtools/sensors) - Microsoft Learn: [Emulate dark or light schemes in the rendered page](https://learn.microsoft.com/microsoft-edge/devtools-guide-chromium/accessibility/preferred-color-scheme-simulation) - Playwright: [Emulation](https://playwright.dev/docs/emulation) - MDN: [prefers-color-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme), [dir](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/dir) - knobs: [knobs](https://knobs.dev/docs/knobs), [limits](https://knobs.dev/docs/limits) ## How to test your website on mobile devices from your desktop URL: https://knobs.dev/blog/test-website-on-mobile-devices ### How to test your website on mobile devices from your desktop Updated October 29, 2026 To test your website on mobile devices from your desktop, open it in Chrome DevTools' device mode (Toggle device toolbar) or Safari's Responsive Design Mode to check the layout at phone sizes, then load it in the iOS Simulator or an Android emulator for a real mobile browser engine. Before you ship, open your local dev server on your own phone over Wi-Fi, because no emulator shows everything. Each method below catches different bugs. We list them from fastest to most real, with the exact steps as of October 2026, and say what each one cannot show you. #### 1. Chrome DevTools device mode This is the quickest check, and it is already in Chrome and Edge. 1. Open your page in Chrome. 2. Open DevTools: Command+Option+I on a Mac, Ctrl+Shift+I on Windows and Linux. 3. Click **Toggle device toolbar** (the phone and tablet icon at the top left of DevTools), or press Command+Shift+M (Ctrl+Shift+M) while DevTools has focus. 4. In the **Dimensions** list at the top of the page, pick a device, or leave it on **Responsive** and drag the handles to any size. 5. Click **Rotate** to switch to landscape. What it changes: the viewport size, the device pixel ratio, the user agent of the preset, and touch input. The **Throttle** list adds slower network and CPU ("Mid-tier mobile", "Low-end mobile"). To add your own phone, open the device list, choose **Edit**, then **Add custom device**. What it does not change: Google's own page calls device mode "a first-order approximation" and says "you don't actually run your code on a mobile device". The page still runs in desktop Chrome. Safari's toolbars, the iOS keyboard, `100vh` behavior on iPhone, and iOS-only bugs do not show up here. Firefox has the same tool: Tools > Browser Tools > **Responsive Design Mode**, or Command+Option+M. #### 2. Safari Responsive Design Mode On a Mac, Safari shows the page with WebKit, the engine that every iPhone browser uses. 1. If you do not see the Develop menu, choose Safari > Settings, click **Advanced**, and turn on **Show features for web developers**. 2. Choose **Develop > Enter Responsive Design Mode** (Control+Command+R). 3. Click a device at the top. Click it again to turn it to landscape. 4. Use the pop-up menus to change the pixel ratio and the user agent. It is closer to an iPhone than Chrome's device mode because the engine is the same, but it is still desktop Safari at a small size. There are no iOS toolbars, no safe areas and no on-screen keyboard. #### 3. Responsive viewer extensions "Responsive viewer" Chrome extensions show your page at several sizes side by side, so you can scroll one and see all of them. They are useful for catching a breakpoint that breaks at one width only. They load each size in a frame of the same desktop Chrome, so they inherit every limit of device mode. Some sites also refuse to load in a frame. Use them for layout, not for real phone behavior. #### 4. iOS Simulator and Android emulator These run the real mobile browser, which is where many bugs live. **iOS Simulator (Mac only):** 1. Install Xcode from the Mac App Store. 2. Choose Xcode > Open Developer Tool > **Simulator**. 3. Pick a device in File > Open Simulator, then open Safari in it. 4. Type your dev server address. The Simulator shares your Mac's network, so `http://localhost:3000` works as is. 5. To inspect, open Safari on the Mac and choose **Develop >** the Simulator's name > your page. **Android emulator:** 1. Install Android Studio and create a virtual device in the Device Manager. 2. Start it and open Chrome. 3. Use `http://10.0.2.2:3000`, not `localhost`. Android's documentation calls `10.0.2.2` the "special alias to your host loopback interface". 4. To inspect, open `chrome://inspect` in desktop Chrome. Simulators show you the real Safari and Chrome toolbars, safe areas, the keyboard and engine-level bugs. They do not show real performance or real touch feel. #### 5. Your real phone, on your local network Nothing replaces the phone in your hand. To open your local dev server on it: 1. Connect the phone and the computer to the same Wi-Fi. 2. Start the dev server so it listens on the network, not only on localhost: - Vite: `npm run dev -- --host`, or `server: { host: true }` in `vite.config`. - Next.js: `next dev -H 0.0.0.0`. 3. Find your computer's address. On a Mac: `ipconfig getifaddr en0`. 4. On the phone, open `http://192.168.1.20:5173` (your address and port). Things that trip people up: - **Next.js blocks it.** Next.js blocks cross-origin requests to dev-only assets by default. Add your address to `allowedDevOrigins` in `next.config.js`, for example `allowedDevOrigins: ['192.168.1.20']`. - **The firewall.** macOS may ask to allow incoming connections for Node. Allow it. - **HTTPS-only features.** Camera, geolocation, service workers and the clipboard need a secure context. `http://192.168.x.x` is not one, while `localhost` is. Use an HTTPS tunnel or a local HTTPS proxy for those. - **Guest or office Wi-Fi.** Many such networks block devices from talking to each other. **Inspect the real phone.** For iPhone: on the phone, turn on Settings > Apps > Safari > Advanced > **Web Inspector** (if your Settings app has no Apps entry, open Safari directly in Settings), connect it to the Mac with a cable, then choose **Develop >** your iPhone > the page in Safari on the Mac. For Android: turn on USB debugging, connect it, and open `chrome://inspect` in desktop Chrome. Its **Port forwarding** option lets the phone open `localhost:3000` from your computer over the cable, with no Wi-Fi setup. #### What emulation cannot fake Keep this list in mind before you trust a desktop check: - **Performance.** A desktop CPU is many times faster; CPU throttling is a rough guess. - **The real browser chrome.** Safari's address bar that shrinks on scroll, and the viewport units (`svh`, `lvh`, `dvh`) that follow it. - **The keyboard.** How a form field, a fixed footer or a chat input moves when the on-screen keyboard opens. - **Real touch.** Pinch, momentum scrolling, and `:hover` that sticks after a tap. - **Hardware.** Camera, sensors, notch and Dynamic Island, low power mode, a bad cell connection. Use desktop tools for most of the work, and keep a real phone for the last pass. #### Where knobs fits We make [knobs](https://knobs.dev/), an open source, dev-only panel that runs inside your own page. It covers the part of this work you do many times a day: looking at a page as a phone without leaving the page. - **Devices in your page.** Pick an iPhone, Pixel, iPad or laptop preset, and the page loads in a real viewport of that size, inside a drawing of the phone with Safari's or Chrome's bars, so media queries and `vw` follow. See [devices](https://knobs.dev/docs/devices). - **The rest of the conditions.** The same panel sets dark mode, reduced motion, text size, locale and right-to-left, time zone and clock, and offline. See [all knobs](https://knobs.dev/docs/knobs). - **Any browser, or any site.** The npm package `@vinena/knobs` works in your own app in any browser, and the [Chrome extension](https://knobs.dev/docs/extension) puts the panel on any site, with the viewport set for real by Chrome. - **For coding agents.** An agent can set a device, wait for the page and grab what broke through `window.knobs`. See [agents](https://knobs.dev/docs/agents). It has the same limit as device mode: it runs in your desktop browser. Our [limits page](https://knobs.dev/docs/limits) lists what it cannot fake, such as real touch with pinch and network throttling. Keep the simulator and your phone for the last pass. To test dark mode, time zones and right-to-left layouts next, see [how to test dark mode, time zones and RTL](https://knobs.dev/blog/test-dark-mode-time-zones-rtl). #### FAQ ##### How can I see what my website looks like on a phone from my computer? Open the site in Chrome, open DevTools with Command+Option+I (Ctrl+Shift+I on Windows), and click Toggle device toolbar. Pick a phone from the Dimensions list. Safari has the same thing under Develop > Enter Responsive Design Mode. Both show the layout at phone size, not a real phone browser. ##### How do I open localhost on my phone? Put the phone on the same Wi-Fi as your computer, start the dev server so it listens on the network (for Vite, `npm run dev -- --host`), find your computer's IP with `ipconfig getifaddr en0` on a Mac, and open `http:// : ` on the phone. ##### Is Chrome's device mode the same as testing on a real phone? No. Google calls device mode a "first-order approximation". It changes the viewport, pixel ratio, user agent and touch, but the page still runs in desktop Chrome on a desktop CPU. Safari on iPhone has its own engine and its own toolbar behavior, so test there before you ship. ##### Is there a Chrome extension to view a site on several devices at once? Yes, several responsive viewer extensions show a page in many frames side by side. They render each size in an iframe of desktop Chrome, so they share the limits of device mode. They are good for a quick layout check across sizes. ##### Can I test iPhone Safari on Windows? Not with Apple's tools. The iOS Simulator and Safari's Web Inspector run only on a Mac. On Windows you can check layouts in Chrome's device mode or use a paid cloud service with real iPhones. #### Sources - Chrome for Developers: [Simulate mobile devices with device mode](https://developer.chrome.com/docs/devtools/device-mode) and [Remote debug Android devices](https://developer.chrome.com/docs/devtools/remote-debugging) - Apple: [Safari Developer Help, Responsive Design Mode](https://support.apple.com/en-us/guide/safari-developer/dev84bd42758/mac), [Use the developer tools in the Develop menu](https://support.apple.com/guide/safari/use-the-developer-tools-in-the-develop-menu-sfri20948/mac), [Inspecting iOS and iPadOS](https://developer.apple.com/documentation/safari-developer-tools/inspecting-ios) - Android Developers: [Set up Android Emulator networking](https://developer.android.com/studio/run/emulator-networking) - Next.js: [allowedDevOrigins](https://nextjs.org/docs/app/api-reference/config/next-config-js/allowedDevOrigins) - Vite: [server.host](https://vite.dev/config/server-options#server-host) ## Color blindness simulator: emulate vision deficiencies URL: https://knobs.dev/use/color-blindness-simulator ### Color blindness simulator The vision knob shows a page as people with a color vision deficiency see it. It draws an SVG color matrix over the page, from Machado et al. 2009, the same model Chromium DevTools uses. A blur is there too. The filter sits on the frame the page runs in, so fixed elements keep their place and the panel stays readable. #### Turn it on On any site, install the knobs [Chrome extension](https://knobs.dev/docs/extension). It works in Chrome and Edge, with no change to the site's code. In your own app, in any browser, install the package and add the mount line for development only: ``` npm i -D @vinena/knobs npx @vinena/knobs init ``` The init command works in a Next or Vite project. Other setups are in [start](https://knobs.dev/docs/start). Then press `⇧K` to open the panel, press `/` and search for "vision". The knobs live in `sessionStorage`, so they survive reloads and go away with the tab. #### Options The knob takes six values: - `protanopia`, `deuteranopia`, `tritanopia` and `achromatopsia`: a color blindness filter, each from the color matrix. - `blur`: a 2px blur. - `none`: the page as it is. Any value other than `none` brings up the frame, a same-origin iframe and a real viewport. It is the same frame the width, height and device knobs use. The knob works in the page with the npm package and with the extension alike. It is not one of the knobs the extension hands to Chrome. Other knobs next to it: contrast, text size and text spacing. Each one is listed in [every knob](https://knobs.dev/docs/knobs). #### Limits - These six filters are all the knob has. It has no levels for a partial deficiency. - The frame loads the page a second time, so in-memory state, such as a half-filled form, is not shared between the two. #### Drive it from an agent A coding agent can set the knob through any browser tool that runs JavaScript in the page, such as Playwright's `page.evaluate` or the Chrome DevTools MCP's `evaluate_script`: ``` window.knobs.setState({ vision: 'deuteranopia' }); await window.knobs.ready(); ``` `ready()` resolves with the state once the page has caught up with the knobs, the frame included. Then take a screenshot. `setState()` throws a `TypeError` at a value the state does not take, and then changes nothing. `reset()` sets the knobs back. See [agents](https://knobs.dev/docs/agents). Next: change what the page reads with a [user agent switcher](https://knobs.dev/use/user-agent-switcher). ## User agent switcher for Chrome and your own dev app URL: https://knobs.dev/use/user-agent-switcher ### User agent switcher The user agent knob changes the browser the page thinks it runs in. It patches `userAgent`, `appVersion`, `platform`, `vendor` and `maxTouchPoints` on `Navigator.prototype`, and `navigator.userAgentData` with its brands, `mobile`, `platform` and `getHighEntropyValues`, all from the same browser. #### Turn it on On any site, install the knobs [Chrome extension](https://knobs.dev/docs/extension). It works in Chrome and Edge, with no change to the site's code. In your own app, in any browser, install the package and add the mount line for development only: ``` npm i -D @vinena/knobs npx @vinena/knobs init ``` The init command works in a Next or Vite project. Other setups are in [start](https://knobs.dev/docs/start). Then press `⇧K` to open the panel, press `/` and search for "user agent". The knobs live in `sessionStorage`, so they survive reloads and go away with the tab. #### Options The knob takes a preset, a custom string or `system`: - Presets: iPhone Safari, Android Chrome, iPad Safari, Mac Safari, Mac Chrome, Windows Chrome, Windows Edge, Linux Firefox and Googlebot. - Custom: any string. It sets `userAgent` and `appVersion` alone, as Chrome DevTools does. Platform, vendor and touch points stay the browser's. - `system`: every property is the browser's own again. Safari and Firefox have no `userAgentData`, so their presets take it away. The iPad preset is the one iPadOS shows sites by default, a Mac with touch points. With the extension, the user agent you pick goes to the tab's own host, so servers see it too. A device in the frame sends none, so no site signs you out. Turn on "real phone mode" in the panel's settings to send the device's user agent with the frame's page loads, so sites serve their mobile site. Some sites may sign you out then. A device sets the user agent to its own browser too, see [mobile simulator](https://knobs.dev/use/mobile-simulator). Every knob is listed in [every knob](https://knobs.dev/docs/knobs). #### Limits With the npm package, the knob changes what page code reads, not what goes over the wire: - The server still sees the real `User-Agent` header, so a mobile redirect or a bot check on the server does not follow the knob. Use the extension for that. - The `Sec-CH-UA` client hint headers stay real. - Workers and service workers keep the real `navigator`. - Without a frame, code that read the user agent before the knob moved keeps what it read. Reload, or load the early script first, see [start](https://knobs.dev/docs/start). #### Drive it from an agent A coding agent can set the knob through any browser tool that runs JavaScript in the page, such as Playwright's `page.evaluate` or the Chrome DevTools MCP's `evaluate_script`: ``` window.knobs.setState({ ua: { preset: 'googlebot' } }); await window.knobs.ready(); ``` For a string of your own, set `{ ua: { preset: 'custom', custom: 'MyBot/1.0' } }`. `ready()` resolves with the state once the page has caught up with the knobs. `setState()` throws a `TypeError` at a value the state does not take, and then changes nothing. `reset()` sets the knobs back. See [agents](https://knobs.dev/docs/agents). Next: put the page in another city with [fake geolocation](https://knobs.dev/use/fake-geolocation). ## Fake geolocation: spoof navigator.geolocation in a page URL: https://knobs.dev/use/fake-geolocation ### Fake geolocation The geolocation knob gives the page a position of your choice. It patches `navigator.geolocation`, so `getCurrentPosition` and `watchPosition` answer with a city, your own coordinates or a route. Answers come a task later, as on a real device, and active watches hear every move of the knob. #### Turn it on On any site, install the knobs [Chrome extension](https://knobs.dev/docs/extension). It works in Chrome and Edge, with no change to the site's code. In your own app, in any browser, install the package and add the mount line for development only: ``` npm i -D @vinena/knobs npx @vinena/knobs init ``` The init command works in a Next or Vite project. Other setups are in [start](https://knobs.dev/docs/start). Then press `⇧K` to open the panel, press `/` and search for a city, such as "tokyo", or type a position, such as `36.9, 30.7`. The knobs live in `sessionStorage`, so they survive reloads and go away with the tab. #### Options The knob takes four kinds of value: - A city preset. - Custom: a latitude, a longitude and an accuracy of your own. - A route: `lat,lng` per line, or a pasted GPX file. It plays on a loop at a set speed, with `heading` and `speed` in the coordinates and a new position for watches every second. - `system`: the browser's real geolocation. `maximumAge` can hand back the last position, and `timeout: 0` without one fails like a real device. `clearWatch` stops a watch. The geo error knob next to it makes the page get an error instead of a position: `denied`, `unavailable` or `timeout`. The error reads like a `GeolocationPositionError`, with `code`, `message` and the code constants. The error works with the position on `system` too. `navigator.permissions.query({ name: "geolocation" })` reports granted, or denied for `denied`, and fires `change` when the knob moves. The time zone knob follows the city's zone unless you set it, see [time zone and clock](https://knobs.dev/use/time-zone). Every knob is listed in [every knob](https://knobs.dev/docs/knobs). #### Limits - The position lives in the page. The knob is not one of the knobs the extension hands to Chrome, so it works in the page with the npm package and with the extension alike. - A `timeout` error waits for `options.timeout`, and never fires without one, like a fix that never comes. #### Drive it from an agent A coding agent can set the knob through any browser tool that runs JavaScript in the page, such as Playwright's `page.evaluate` or the Chrome DevTools MCP's `evaluate_script`: ``` window.knobs.setState({ geo: { preset: 'custom', lat: 36.9, lng: 30.7 } }); await window.knobs.ready(); ``` To test a refusal, set `{ geo: { error: 'denied' } }`. Object knobs take one field at a time. `ready()` resolves with the state once the page has caught up with the knobs. `setState()` throws a `TypeError` at a value the state does not take, and then changes nothing. `reset()` sets the knobs back. See [agents](https://knobs.dev/docs/agents). Next: run a [reduced motion test](https://knobs.dev/use/reduced-motion). ## Reduced motion test: emulate prefers-reduced-motion URL: https://knobs.dev/use/reduced-motion ### Reduced motion test The reduced motion knob makes the page read `prefers-reduced-motion: reduce`, in your CSS and in `matchMedia`. It rewrites every `prefers-reduced-motion` media rule in the page's own stylesheets, and patches `matchMedia` so JavaScript reads the same value. #### Turn it on On any site, install the knobs [Chrome extension](https://knobs.dev/docs/extension). It works in Chrome and Edge, with no change to the site's code. In your own app, in any browser, install the package and add the mount line for development only: ``` npm i -D @vinena/knobs npx @vinena/knobs init ``` The init command works in a Next or Vite project. Other setups are in [start](https://knobs.dev/docs/start). Then press `⇧K` to open the panel, press `/` and search for "reduced motion". The knobs live in `sessionStorage`, so they survive reloads and go away with the tab. #### Options The knob takes two values: - `reduce`: the page reads `prefers-reduced-motion: reduce`. - `system`: the page reads your real setting. New stylesheets are picked up as they arrive, so the knob keeps working through hot reloads and lazily loaded CSS. A list from `matchMedia` gets a real `change` event when the knob moves its verdict. With the extension, Chrome sets reduced motion for real. While it is set, Chrome shows its "started debugging this browser" bar. To avoid the bar, turn off "real browser settings" in the panel's settings, and the knob works in the page as with the npm package. Two knobs next to it help with motion too: - Animation speed runs every animation at 0.25 or 0.1, or pauses it. CSS animations and transitions are included, in the document and every open shadow root. When `window.gsap` exists, its global timeline follows too. - Replay animations, `⇧R`, runs every animation again. Each one is listed in [every knob](https://knobs.dev/docs/knobs). #### Limits knobs works from inside the page, so some things stay out of its reach: - Only same-origin stylesheets can be rewritten. A cross-origin `` keeps its real media behavior. - A `MediaQueryList` made before knobs mounted gets no change event. Reload, or load the early script first, see [start](https://knobs.dev/docs/start). - The speed knob slows what the Web Animations API sees. A `requestAnimationFrame` loop keeps its own pace, and only the WAAPI-backed animations of Motion slow down. - Scroll-driven animations keep following the scroll. #### Drive it from an agent A coding agent can set the knob through any browser tool that runs JavaScript in the page, such as Playwright's `page.evaluate` or the Chrome DevTools MCP's `evaluate_script`: ``` window.knobs.setState({ motion: 'reduce' }); await window.knobs.ready(); ``` To pause every animation instead, set `{ speed: 0 }`. `ready()` resolves with the state once the page has caught up with the knobs. `setState()` throws a `TypeError` at a value the state does not take, and then changes nothing. `reset()` sets the knobs back. See [agents](https://knobs.dev/docs/agents). Next: run a [dark mode test](https://knobs.dev/use/dark-mode) on the same page. ## Dark mode test: emulate prefers-color-scheme in the page URL: https://knobs.dev/use/dark-mode ### Dark mode test The color scheme knob puts a page in light or dark mode, in your CSS and in `matchMedia`. It rewrites every `prefers-color-scheme` media rule in the page's own stylesheets, and patches `matchMedia` so JavaScript reads the same value. It also sets `color-scheme` on ``, so `light-dark()` flips too. #### Turn it on On any site, install the knobs [Chrome extension](https://knobs.dev/docs/extension). It works in Chrome and Edge, with no change to the site's code. In your own app, in any browser, install the package and add the mount line for development only: ``` npm i -D @vinena/knobs npx @vinena/knobs init ``` The init command works in a Next or Vite project. Other setups are in [start](https://knobs.dev/docs/start). Then press `⇧K` to open the panel, press `/` and search for "color scheme". The knobs live in `sessionStorage`, so they survive reloads and go away with the tab. #### Options The knob takes three values: - `light`: the page reads `prefers-color-scheme: light`. - `dark`: the page reads `prefers-color-scheme: dark`. - `system`: the page reads your real setting. New stylesheets are picked up as they arrive, so the knob keeps working through hot reloads and lazily loaded CSS. A list from `matchMedia` gets a real `change` event when the knob moves its verdict, so `onchange` and `addListener` work. When the page is in a frame (the width, height and device knobs), the browser does the work: the frame's `color-scheme` becomes the framed page's `prefers-color-scheme`, in Chrome 129 and later and Firefox 105 and later. Then cross-origin stylesheets and shadow roots follow too. Safari gets the rewrite. With the extension, Chrome sets the color scheme for real. While it is set, Chrome shows its "started debugging this browser" bar. To avoid the bar, turn off "real browser settings" in the panel's settings, and the knob works in the page as with the npm package. Other knobs next to it: reduced motion, contrast and reduced transparency. Each one is listed in [every knob](https://knobs.dev/docs/knobs). #### Limits knobs works from inside the page, so some things stay out of its reach: - Only same-origin stylesheets can be rewritten. A cross-origin `` keeps its real media behavior. - A `MediaQueryList` made before knobs mounted gets no change event. Reload, or load the early script first, see [start](https://knobs.dev/docs/start). - `forced-colors`, high contrast and print media need devtools. #### Drive it from an agent A coding agent can set the knob through any browser tool that runs JavaScript in the page, such as Playwright's `page.evaluate` or the Chrome DevTools MCP's `evaluate_script`: ``` window.knobs.setState({ scheme: 'dark' }); await window.knobs.ready(); ``` `ready()` resolves with the state once the page has caught up with the knobs. `setState()` throws a `TypeError` at a value the state does not take, and then changes nothing. `reset()` sets the knobs back. See [agents](https://knobs.dev/docs/agents). Next: put the page in another [time zone and clock](https://knobs.dev/use/time-zone). ## Change the time zone and fake the date for testing URL: https://knobs.dev/use/time-zone ### Time zone and clock The time zone knob puts the page in another zone, and the clock knob sets the time it reads. Both replace the page's `Date`. Local getters, `getTimezoneOffset`, `toString` and `toLocale*String` use the zone, and `Date.now()` and `new Date()` read the clock. `Intl.DateTimeFormat` and `Temporal.Now`, where the browser has it, follow too. #### Turn it on On any site, install the knobs [Chrome extension](https://knobs.dev/docs/extension). It works in Chrome and Edge, with no change to the site's code. In your own app, in any browser, install the package and add the mount line for development only: ``` npm i -D @vinena/knobs npx @vinena/knobs init ``` The init command works in a Next or Vite project. Other setups are in [start](https://knobs.dev/docs/start). Then press `⇧K` to open the panel, press `/` and type a zone such as `Europe/Paris`, or a jump such as `+2d`. The knobs live in `sessionStorage`, so they survive reloads and go away with the tab. #### Options The time zone knob takes any IANA zone, `geo` to follow the zone of the geolocation city, or `system`. UTC methods, `toISOString` and `toJSON` are left alone. The clock knob takes a jump from +1 hour to +30 days, or a date and time, in one of two modes: - Offset: the clock runs on from the set instant, at speed 1, 60 or 3600. - Frozen: the clock stays at the set instant. A date built from an argument, such as `new Date(ms)` or a string, names its own instant and is left alone. A reload carries on where the clock was. Turn on "send to server" and `fetch` and `XMLHttpRequest` calls to the page's own origin carry the clock's time, in an `x-knobs-now` header. Read it on your server behind a dev check, see [the clock and your server](https://knobs.dev/docs/knobs#the-clock-and-your-server). Never honor the header in production. The geolocation knob sets a city and its zone together, see [fake geolocation](https://knobs.dev/use/fake-geolocation). #### Limits Both knobs live in the page. They are not among the knobs the extension hands to Chrome, so they work the same with the extension and the npm package: - Workers, service workers and the server keep the real zone and time, so a server rendered date can mismatch on hydration. - The clock moves the time a page reads, not the time that passes. `setTimeout`, `setInterval`, `requestAnimationFrame` and `performance.now()` keep real time. - Code that kept `Date` or `Date.now` from before knobs loaded reads the real time. Load the early script first, see [start](https://knobs.dev/docs/start). - The first page load is a navigation, not a fetch, so it never carries the header. #### Drive it from an agent A coding agent can set the knobs through any browser tool that runs JavaScript in the page, such as Playwright's `page.evaluate` or the Chrome DevTools MCP's `evaluate_script`: ``` window.knobs.setState({ timeZone: 'Asia/Kathmandu', clock: { mode: 'frozen', at: Date.parse('2027-01-01T09:00:00Z') }, }); await window.knobs.ready(); ``` `at` is epoch ms. Set `mode` and `at` in one patch, as a new mode starts from what the clock reads now. `ready()` resolves with the state once the page has caught up with the knobs. `reset()` sets the knobs back. See [agents](https://knobs.dev/docs/agents). Next: test the page's text with [pseudolocalization](https://knobs.dev/use/pseudolocalization). ## Pseudo localization for i18n testing in any web page URL: https://knobs.dev/use/pseudolocalization ### Pseudolocalization The pseudo knob turns the page's text into accented, padded, bracketed strings, such as `[Ŝéţţîñĝš ···]`. It rewrites the text and the `placeholder`, `title`, `aria-label` and `alt` attributes. It waits until the page is loaded and idle, so hydration never sees the change. #### Turn it on On any site, install the knobs [Chrome extension](https://knobs.dev/docs/extension). It works in Chrome and Edge, with no change to the site's code. In your own app, in any browser, install the package and add the mount line for development only: ``` npm i -D @vinena/knobs npx @vinena/knobs init ``` The init command works in a Next or Vite project. Other setups are in [start](https://knobs.dev/docs/start). Then press `⇧K` to open the panel, press `/` and search for "pseudo". The knobs live in `sessionStorage`, so they survive reloads and go away with the tab. #### Options The knob is on or off. - On: the page's text and those attributes get the pseudo strings. New and changed text follows. - Off: the original text comes back, also in nodes the page detached since. Text the page reads back and writes again stays one layer deep. The knob works in the page with the npm package and with the extension alike. It is not one of the knobs the extension hands to Chrome. Use it with the locale knob, which takes any BCP 47 language tag and a direction. The locale knob sets `lang` and `dir` on `` and makes the tag the default locale of every `Intl` service. Both are listed in [every knob](https://knobs.dev/docs/knobs). #### Limits - The knob skips scripts, styles, textareas, contenteditable and options without a value. The text of those is what their form sends. - It also changes data values, such as numbers and names. That is not a bug. #### Drive it from an agent A coding agent can set the knob through any browser tool that runs JavaScript in the page, such as Playwright's `page.evaluate` or the Chrome DevTools MCP's `evaluate_script`: ``` window.knobs.setState({ pseudo: true }); await window.knobs.ready(); ``` `ready()` resolves with the state once the page has caught up with the knobs. The agent skill that ships with the package uses `{ pseudo: true }` to find text that is cut off or not translated. Then the agent can `grab()` the broken elements, fix the code and check again. `reset()` sets the knobs back. See [agents](https://knobs.dev/docs/agents). Next: run an [RTL layout test](https://knobs.dev/use/rtl) on the same page. ## RTL layout test: right to left testing in any web page URL: https://knobs.dev/use/rtl ### RTL layout test The locale knob puts the page in another language tag and direction. It sets `lang` and `dir` on ``, and puts them back if the page writes them over. It also patches `navigator.language` and makes the tag the default locale of every `Intl` service. #### Turn it on On any site, install the knobs [Chrome extension](https://knobs.dev/docs/extension). It works in Chrome and Edge, with no change to the site's code. In your own app, in any browser, install the package and add the mount line for development only: ``` npm i -D @vinena/knobs npx @vinena/knobs init ``` The init command works in a Next or Vite project. Other setups are in [start](https://knobs.dev/docs/start). Then press `⇧K` to open the panel, press `/` and search for "rtl". The knobs live in `sessionStorage`, so they survive reloads and go away with the tab. #### Options The knob takes any BCP 47 language tag, such as `ar` or `pt-BR`, and a direction: - `rtl`: right to left. - `ltr`: left to right. - `system`: the direction comes from the tag, through `Intl.Locale` text info, with `ar`, `he`, `fa` and `ur` as the fallback. The tag and the direction are set apart, so you can pair an English tag with `rtl` and keep text you can read. The knob also writes the tag into the stores i18n libraries read, and reloads the page when it changes: the Paraglide cookie, Paraglide and i18next local storage, and `NEXT_LOCALE` on Next.js pages. Back to `system`, each store gets its old value, unless the page changed it since. The knob works in the page with the npm package and with the extension alike. It is not one of the knobs the extension hands to Chrome. Use it with the pseudo knob, which turns the page's text into accented, padded strings, see [pseudolocalization](https://knobs.dev/use/pseudolocalization). Both are listed in [every knob](https://knobs.dev/docs/knobs). #### Limits - The knob does not translate the page. Text changes only where the page's own i18n library reads the tag. - A call that names its own locale, such as `toLocaleString('en-US')`, keeps it. - In fresh mode, a locale the page keeps in `localStorage` does not follow the knob, see [the panel](https://knobs.dev/docs/panel). #### Drive it from an agent A coding agent can set the knob through any browser tool that runs JavaScript in the page, such as Playwright's `page.evaluate` or the Chrome DevTools MCP's `evaluate_script`: ``` window.knobs.setState({ locale: { lang: 'ar', dir: 'rtl' } }); await window.knobs.ready(); ``` A new tag can reload the page. If it does, the evaluate ends with it: wait for the load, then call `ready()` on the new page. `reset()` sets the knobs back, and can reload the page too. See [agents](https://knobs.dev/docs/agents). Next: open the page on a phone with the [mobile simulator](https://knobs.dev/use/mobile-simulator). ## Mobile simulator in Chrome: iPhone, Pixel and iPad frames URL: https://knobs.dev/use/mobile-simulator ### Mobile simulator The device knob shows the page on a phone, a tablet or a laptop. One pick sets the width, height, device pixel ratio and touch screen of that device. The page runs in a same-origin frame, a real viewport, so media queries, `vw` units and fixed elements follow the device's size. #### Turn it on On any site, install the knobs [Chrome extension](https://knobs.dev/docs/extension). It works in Chrome and Edge, with no change to the site's code. In your own app, in any browser, install the package and add the mount line for development only: ``` npm i -D @vinena/knobs npx @vinena/knobs init ``` The init command works in a Next or Vite project. Other setups are in [start](https://knobs.dev/docs/start). Then press `⇧K` to open the panel, press `/` and search for "iphone", "pixel" or "tablet". The knobs live in `sessionStorage`, so they survive reloads and go away with the tab. #### Options The presets come in six families: iPhone, such as iPhone 18 Pro (402 × 874) and iPhone SE (375 × 667); Pixel, such as Pixel 10 (412 × 924); iPad, such as iPad mini (744 × 1133); MacBook Air 13; laptop; and desktop. The full list is in [devices](https://knobs.dev/docs/devices). - Orientation: `landscape` turns the frame. Type a size such as `390x844` for a custom one. - Mock: a phone or tablet comes up in a mock of its body, with the island or punch hole and the buttons. Every iPhone and Pixel wears its maker's own bezel. - Browser: a phone shows the page in its browser, Safari's bars on an iPhone and Chrome's toolbar on a Pixel. The bars minimize as the page scrolls, or stay one way. - Touch pointer: on a touch device, `(pointer: coarse)` matches and the mouse acts as a finger. A press scrolls and flings, and a tap clicks. - Posture: the iPhone Duo folds, and `unfold` and `fold` open and shut it. A device sets the user agent to its own browser too. The frame reloads when a pick changes the user agent, the touch screen or the ratio. With the extension, a device with no mock or browser drawn becomes the tab's own viewport, with no reload. Turn on "real phone mode" in the panel's settings to send the device's user agent with the frame's page loads, so sites serve their mobile site. #### Limits The page runs in your own browser, in a frame, with the phone drawn around it: - The touch pointer is made in the page. CSS `:hover` still follows the mouse, and there is one finger only, with no pinch. - The phone's browser bars do not open their menus, and there is no keyboard. - `100svh`, `100lvh`, `100vh` and `clientHeight` follow the frame's height. - The frame loads the page a second time, so in-memory state is not shared between the two. - Device pixel ratio works in Chromium only. #### Drive it from an agent A coding agent can set the knob through any browser tool that runs JavaScript in the page, such as Playwright's `page.evaluate` or the Chrome DevTools MCP's `evaluate_script`: ``` window.knobs.setState({ device: 'iphone-17', orientation: 'landscape' }); await window.knobs.ready(); ``` To leave the device, call `reset()` or set `{ device: 'none', width: 'full', height: 'full', dpr: 'system' }`. `device: 'none'` alone keeps the device's size, so the frame stays up. See [agents](https://knobs.dev/docs/agents). Next: check your breakpoints with [window sizes](https://knobs.dev/use/window-sizes). ## Window sizes: a responsive viewer for your breakpoints URL: https://knobs.dev/use/window-sizes ### Window sizes The viewport width and height knobs give the page a viewport of any size, with no change to the browser window. The page runs in a same-origin frame of that size, a real viewport, so media queries, fixed elements, `vw` units and container queries all see it. The other knobs follow the page into the frame. #### Turn it on On any site, install the knobs [Chrome extension](https://knobs.dev/docs/extension). It works in Chrome and Edge, with no change to the site's code. In your own app, in any browser, install the package and add the mount line for development only: ``` npm i -D @vinena/knobs npx @vinena/knobs init ``` The init command works in a Next or Vite project. Other setups are in [start](https://knobs.dev/docs/start). Then press `⇧K` to open the panel, press `/` and type a width such as `390` or `500`. The knobs live in `sessionStorage`, so they survive reloads and go away with the tab. #### Options - Width: a size in px, or `full` for the window. - Height: a size in px, or `full`. With a height, `innerHeight`, `100vh`, `svh`, `dvh` and height media queries see the frame's height. - Orientation: turns a frame that has a width and a height. - Device pixel ratio: 1, 2 or 3, so resolution queries and `srcset` follow. - Zoom: how big the frame is drawn, `fit`, or 50, 75, 100, 125 or 150 percent. The page inside keeps its viewport. A frame wider or taller than the window is scaled down to fit. The readout says the device, the size and the ratio, such as `iPhone 16 Pro · 402 × 874 · 3x`. Meta or Ctrl with `+` and `-` zoom the frame a step, and with `0` fit it again. With the extension, a plain size becomes the tab's own viewport, with no reload. While it is set, Chrome shows its "started debugging this browser" bar. To avoid the bar, turn off "real browser settings" in the panel's settings. For a phone or tablet with its body and browser, see [mobile simulator](https://knobs.dev/use/mobile-simulator). Every knob is listed in [every knob](https://knobs.dev/docs/knobs). #### Limits - knobs shows one frame at a time. It does not show several sizes side by side, so set them one after another. - The frame loads the page a second time, so in-memory state, such as a half-filled form, is not shared between the two. - A page that refuses to be framed with `X-Frame-Options` or `frame-ancestors` gets a notice. The extension removes those headers for the frame's loads of the page's host. - Device pixel ratio outside Chromium needs devtools. #### Drive it from an agent A coding agent can set the knobs through any browser tool that runs JavaScript in the page, such as Playwright's `page.evaluate` or the Chrome DevTools MCP's `evaluate_script`: ``` window.knobs.setState({ width: 390, height: 844 }); await window.knobs.ready(); ``` `ready()` resolves with the state once the frame has caught up. To check several sizes, repeat with each one and take a screenshot after each `ready()`. `setState({ width: 'full', height: 'full' })` or `reset()` gives the page the window back. See [agents](https://knobs.dev/docs/agents). Next: see the page through a [color blindness simulator](https://knobs.dev/use/color-blindness-simulator). ## knobs vs Polypane: price, platform and features compared URL: https://knobs.dev/compare/polypane ### knobs vs Polypane Facts checked on 2026-11-13, from each product's own pages. The sources are at the end. In the tables, "not documented" means the vendor's pages we read do not describe it. It does not mean the feature is missing. #### The two products knobs is a free, open source panel for web developers and designers, under the MIT license. It comes as an npm package that runs inside your own app, in any browser, and as a Chrome extension for any site in Chrome and Edge. See [start](https://knobs.dev/docs/start) and [Chrome extension](https://knobs.dev/docs/extension). Polypane is a desktop app for Windows, macOS and Linux. It has a 14 day free trial with no credit card, then Individual, Business (2 to 20 seats) and Enterprise plans. There is no permanent free plan. Students get it free through the GitHub Student Developer Pack. The structured data on its pricing page lists offers from USD 9 to USD 320. | | knobs | Polypane | | --- | --- | --- | | Price | free | 14 day trial, then paid plans | | Platform | npm package in any browser; extension for Chrome and Edge | desktop app: Windows, macOS, Linux | | Latest release | 0.7.6, November 26, 2026 | v31.0.0, September 29, 2026 | #### Features | Feature | knobs | Polypane | | --- | --- | --- | | Device presets | iPhone, Pixel, iPad and laptop, with maker bezels | yes; device frames not documented | | Several sizes at once | no: one viewport per page | yes: "every breakpoint visible and synchronized" | | Dark mode | yes | yes | | Reduced motion | yes, plus animation speed and replay | yes | | Contrast | `prefers-contrast` and reduced transparency | `prefers-contrast` | | Forced colors | no | yes | | Color blindness simulation | protanopia, deuteranopia, tritanopia, achromatopsia, blur | 9 color blindness types, plus visual impairments | | Text size | browser default font size, text spacing | default font size, text scale | | Locale | any language tag, `Intl` included | browser locale (request and `Intl`), page language | | Right to left | yes | yes | | Pseudolocalization | yes | not documented | | Time zone | any IANA zone | not documented | | Fake date and clock | jump ahead, pick a date, freeze, speed up | not documented | | Geolocation | a city, your own coordinates, a route, errors | not documented | | User agent | yes | yes | | Network throttling | no: offline only, and `navigator.connection` values | Fast 4G, Slow 4G, 3G, offline | | Element copy for agents | html, components and source files | not documented | | Agent access | a window API for Playwright or the Chrome DevTools MCP | MCP through chrome-devtools-mcp on port 5858 | | Runs inside your own page | yes, `npm i -D @vinena/knobs` | no, it is a desktop browser | #### Where knobs is limited - knobs shows one viewport per page. It has no view of several sizes side by side. - knobs has no network throttling. It can make the page read offline (with the extension, requests really fail) and set the values `navigator.connection` reads, without slowing anything down. - `forced-colors` and high contrast mode cannot be set from inside a page. The knobs docs send you to the browser's devtools for them. See [limits](https://knobs.dev/docs/limits). #### When to use which These follow from the facts above: - Polypane is a desktop app that shows many synchronized panes. To see several breakpoints at once, Polypane does that and knobs does not. - knobs runs inside your page as a dev dependency, or on any site through the Chrome extension, so it stays in the browser you test in. Each knob has its own page: [mobile simulator](https://knobs.dev/use/mobile-simulator), [window sizes](https://knobs.dev/use/window-sizes), [dark mode](https://knobs.dev/use/dark-mode), [time zone](https://knobs.dev/use/time-zone), [fake geolocation](https://knobs.dev/use/fake-geolocation) and [pseudolocalization](https://knobs.dev/use/pseudolocalization). Coding agents: see [agents](https://knobs.dev/docs/agents). #### Sources - knobs: [every knob](https://knobs.dev/docs/knobs), [devices](https://knobs.dev/docs/devices), [agents](https://knobs.dev/docs/agents), [limits](https://knobs.dev/docs/limits), [Chrome Web Store listing](https://chromewebstore.google.com/detail/knobs/cpdmafeojnbdnnhldafobkaajiemcidj) - Polypane: [pricing](https://polypane.app/pricing/), [changelog](https://polypane.app/docs/changelog/), [features](https://polypane.app/features/), [emulation](https://polypane.app/docs/emulation/), [device presets](https://polypane.app/docs/device-presets/), [simulators](https://polypane.app/docs/simulators/), [MCP server](https://polypane.app/docs/mcp-server/) ## knobs vs Responsively App: platform and features compared URL: https://knobs.dev/compare/responsively ### knobs vs Responsively App Facts checked on 2026-11-13, from each product's own pages and code. The sources are at the end. In the tables, "not documented" means the project's pages we read do not describe it. It does not mean the feature is missing. "Not found in source" means a search of the main branch of Responsively App's code on 2026-11-13 did not find it. That branch also holds the unreleased v2 beta code. It is our search, not a statement by the project. #### The two products knobs is a free, open source panel for web developers and designers, under the MIT license. It comes as an npm package that runs inside your own app, in any browser, and as a Chrome extension for any site in Chrome and Edge. See [start](https://knobs.dev/docs/start) and [Chrome extension](https://knobs.dev/docs/extension). Responsively App is a free, open source desktop app for Mac, Windows and Linux, under the AGPL-3.0 license. Its "Responsively Helper" browser extensions for Chrome, Firefox and Edge send links to the app. | | knobs | Responsively App | | --- | --- | --- | | Price | free | free | | License | MIT | AGPL-3.0 | | Platform | npm package in any browser; extension for Chrome and Edge | desktop app: Mac, Windows, Linux | | Latest release | 0.7.6, November 26, 2026 | v1.18.0, 2026-02-17; v2.0.0-beta.0 pre-release, 2026-09-20 | #### Features | Feature | knobs | Responsively App | | --- | --- | --- | | Device presets | iPhone, Pixel, iPad and laptop, with maker bezels | "30+ built-in device profiles"; frames in v2 beta | | Several sizes at once | no: one viewport per page | yes: "All Devices at once" | | Dark mode | yes | yes, a color scheme toggle | | Reduced motion | yes, plus animation speed and replay | not found in source | | Contrast and forced colors | `prefers-contrast` and reduced transparency; no forced colors | not found in source | | Color blindness simulation | protanopia, deuteranopia, tritanopia, achromatopsia, blur | deuteranopia, protanopia and more | | Text size | browser default font size, text spacing | not found in source | | Locale | any language tag, `Intl` included | a custom Accept-Language header | | Right to left | yes | not found in source | | Pseudolocalization | yes | not found in source | | Time zone | any IANA zone | not found in source | | Fake date and clock | jump ahead, pick a date, freeze, speed up | not found in source | | Geolocation | a city, your own coordinates, a route, errors | not found in source | | User agent | yes | yes, per device | | Network throttling | no: offline only, and `navigator.connection` values | not found in source | | Element copy for agents | html, components and source files | not documented; its MCP server gives screenshots | | Agent access | a window API for Playwright or the Chrome DevTools MCP | built-in MCP server, `npx -y @responsively/mcp`, in the v2 beta | | Runs inside your own page | yes, `npm i -D @vinena/knobs` | no, it is a desktop browser | #### Where knobs is limited - knobs shows one viewport per page. Responsively App shows all devices at once. - knobs has no network throttling. It can make the page read offline (with the extension, requests really fail) and set the values `navigator.connection` reads. - `forced-colors` cannot be set from inside a page. See [limits](https://knobs.dev/docs/limits). #### When to use which These follow from the facts above: - Responsively App is a desktop app that shows one page on many devices at once. - knobs runs inside your page as a dev dependency, or on any site through the Chrome extension, and has knobs for time zone, clock, geolocation and reduced motion. Each knob has its own page: [mobile simulator](https://knobs.dev/use/mobile-simulator), [reduced motion](https://knobs.dev/use/reduced-motion), [time zone](https://knobs.dev/use/time-zone), [fake geolocation](https://knobs.dev/use/fake-geolocation), [right to left](https://knobs.dev/use/rtl) and [pseudolocalization](https://knobs.dev/use/pseudolocalization). #### Sources - knobs: [every knob](https://knobs.dev/docs/knobs), [devices](https://knobs.dev/docs/devices), [agents](https://knobs.dev/docs/agents), [limits](https://knobs.dev/docs/limits), [Chrome Web Store listing](https://chromewebstore.google.com/detail/knobs/cpdmafeojnbdnnhldafobkaajiemcidj) - Responsively App: [site](https://responsively.app/), [README and code](https://github.com/responsively-org/responsively-app), [releases](https://github.com/responsively-org/responsively-app/releases) ## knobs vs Sizzy: price, platform and features side by side URL: https://knobs.dev/compare/sizzy ### knobs vs Sizzy Facts checked on 2026-11-13, from each product's own pages. The sources are at the end. In the tables, "not documented" means the vendor's pages we read do not describe it. It does not mean the feature is missing. #### The two products knobs is a free, open source panel for web developers and designers, under the MIT license. It comes as an npm package that runs inside your own app, in any browser, and as a Chrome extension for any site in Chrome and Edge. See [start](https://knobs.dev/docs/start) and [Chrome extension](https://knobs.dev/docs/extension). Sizzy is a desktop app for macOS (Apple silicon and Intel), Windows and Linux. It costs $15 a month, $144 a year or $499 for a lifetime license. Its pricing says: "There is no free tier and no trial". | | knobs | Sizzy | | --- | --- | --- | | Price | free | $15 a month, $144 a year, $499 lifetime | | Platform | npm package in any browser; extension for Chrome and Edge | desktop app: macOS, Windows, Linux | | Latest release | 0.7.6, November 26, 2026 | not documented; the homepage names Sizzy 74 | #### Features | Feature | knobs | Sizzy | | --- | --- | --- | | Device presets and frames | iPhone, Pixel, iPad and laptop, with maker bezels | yes: "Device frames, minimal headers, custom devices" | | Several sizes at once | no: one viewport per page | yes: "Real device sizes side by side" | | Dark mode | yes | yes | | Reduced motion | yes, plus animation speed and replay | not documented | | Contrast and forced colors | `prefers-contrast` and reduced transparency; no forced colors | not documented | | Color blindness simulation | protanopia, deuteranopia, tritanopia, achromatopsia, blur | not documented | | Text size | browser default font size, text spacing | zoom per device | | Locale | any language tag, `Intl` included | yes | | Right to left | yes | not documented | | Pseudolocalization | yes | not documented | | Time zone | any IANA zone | not documented | | Fake date and clock | jump ahead, pick a date, freeze, speed up | not documented | | Geolocation | a city, your own coordinates, a route, errors | not documented | | User agent | yes | yes: "real viewports and user agents" | | Network throttling | no: offline only, and `navigator.connection` values | yes | | Element copy for agents | html, components and source files | in-app agents get screenshots from your devices | | Agent access | a window API for Playwright or the Chrome DevTools MCP | runs Claude Code or Codex CLI inside the app, with MCP servers and skills; no external MCP server documented | | Runs inside your own page | yes, `npm i -D @vinena/knobs` | no, it is a desktop browser | #### Where knobs is limited - knobs shows one viewport per page. Sizzy shows device sizes side by side. - knobs has no network throttling. It can make the page read offline (with the extension, requests really fail) and set the values `navigator.connection` reads. Sizzy lists network throttling. - `forced-colors` cannot be set from inside a page. See [limits](https://knobs.dev/docs/limits). #### When to use which These follow from the facts above: - Sizzy is a paid desktop app that shows many devices side by side and runs coding agents inside the app. - knobs is free and runs inside your page as a dev dependency, or on any site through the Chrome extension. A coding agent drives it through the browser tool it already uses. See [agents](https://knobs.dev/docs/agents). Each knob has its own page: [mobile simulator](https://knobs.dev/use/mobile-simulator), [window sizes](https://knobs.dev/use/window-sizes), [color blindness simulator](https://knobs.dev/use/color-blindness-simulator), [time zone](https://knobs.dev/use/time-zone) and [fake geolocation](https://knobs.dev/use/fake-geolocation). #### Sources - knobs: [every knob](https://knobs.dev/docs/knobs), [devices](https://knobs.dev/docs/devices), [agents](https://knobs.dev/docs/agents), [limits](https://knobs.dev/docs/limits), [Chrome Web Store listing](https://chromewebstore.google.com/detail/knobs/cpdmafeojnbdnnhldafobkaajiemcidj) - Sizzy: [site](https://sizzy.co/), [pricing](https://sizzy.co/pricing), [llms-full.txt](https://sizzy.co/llms-full.txt) ## knobs vs Responsive Viewer: two Chrome extensions compared URL: https://knobs.dev/compare/responsive-viewer ### knobs vs Responsive Viewer Facts checked on 2026-11-13, from each product's own pages. The sources are at the end. We read Responsive Viewer's site and store page; we did not install it. Several other Chrome Web Store extensions use the same name. This page is about the one from responsiveviewer.org. In the tables, "not documented" means the project's pages we read do not describe it. It does not mean the feature is missing. #### The two products knobs is a free, open source panel for web developers and designers, under the MIT license. It comes as an npm package that runs inside your own app, in any browser, and as a Chrome extension for any site in Chrome and Edge. See [start](https://knobs.dev/docs/start) and [Chrome extension](https://knobs.dev/docs/extension). Responsive Viewer is a Chrome extension, open source under the MIT license. It is free to add. A "Professional" plan, $4.99 monthly or $3.99 yearly, removes ads and adds all mockups, all screens and annotations. | | knobs | Responsive Viewer | | --- | --- | --- | | Price | free | free; Professional plan $4.99 monthly or $3.99 yearly | | License | MIT | MIT | | Platform | npm package in any browser; extension for Chrome and Edge | Chrome extension | | Latest release | 0.7.6, November 26, 2026 | store version 1.1.25, August 12, 2026 | #### Features | Feature | knobs | Responsive Viewer | | --- | --- | --- | | Device presets and frames | iPhone, Pixel, iPad and laptop, with maker bezels | yes: "real screen mockups" | | Several sizes at once | no: one viewport per page | yes: multi-screen preview, with synced scroll and navigation | | Dark mode | yes | not documented | | Reduced motion | yes, plus animation speed and replay | not documented | | Contrast and forced colors | `prefers-contrast` and reduced transparency; no forced colors | not documented | | Color blindness simulation | protanopia, deuteranopia, tritanopia, achromatopsia, blur | not documented | | Text size | browser default font size, text spacing | not documented | | Locale and right to left | any language tag and direction, `Intl` included | not documented | | Pseudolocalization | yes | not documented | | Time zone and clock | any IANA zone; jump ahead, pick a date, freeze, speed up | not documented | | Geolocation | a city, your own coordinates, a route, errors | not documented | | User agent | yes | not documented | | Network throttling | no: offline only, and `navigator.connection` values | not documented | | Element copy for agents | html, components and source files | not documented | | Agent access | a window API for Playwright or the Chrome DevTools MCP | not documented | | Runs inside your own page | yes, `npm i -D @vinena/knobs` | no, it is an extension | #### Where knobs is limited - knobs shows one viewport per page. Responsive Viewer shows several screens at once and keeps their scroll and navigation in sync. - knobs has no network throttling. It can make the page read offline (with the extension, requests really fail) and set the values `navigator.connection` reads. - `forced-colors` cannot be set from inside a page. See [limits](https://knobs.dev/docs/limits). #### When to use which These follow from the facts above: - Both are Chrome extensions. To see one page on several screens at once, Responsive Viewer does that and knobs does not. - knobs is one viewport with knobs for look, locale, time, place and the user agent. It also comes as an npm package for your own app in any browser. Each knob has its own page: [mobile simulator](https://knobs.dev/use/mobile-simulator), [window sizes](https://knobs.dev/use/window-sizes), [dark mode](https://knobs.dev/use/dark-mode), [user agent switcher](https://knobs.dev/use/user-agent-switcher) and [time zone](https://knobs.dev/use/time-zone). #### Sources - knobs: [every knob](https://knobs.dev/docs/knobs), [devices](https://knobs.dev/docs/devices), [limits](https://knobs.dev/docs/limits), [Chrome Web Store listing](https://chromewebstore.google.com/detail/knobs/cpdmafeojnbdnnhldafobkaajiemcidj) - Responsive Viewer: [site](https://responsiveviewer.org/), [Chrome Web Store listing](https://chromewebstore.google.com/detail/responsive-viewer/inmopeiepgfljkpkidclfgbgbmfcennb), [code](https://github.com/skmail/responsive-viewer) ## knobs vs Chrome DevTools device mode and emulation compared URL: https://knobs.dev/compare/chrome-devtools ### knobs vs Chrome DevTools Facts checked on 2026-11-13, from each product's own pages. The sources are at the end. In the tables, "not documented" means the Chrome DevTools pages we read do not describe it. It does not mean the feature is missing. #### The two products knobs is a free, open source panel for web developers and designers, under the MIT license. It comes as an npm package that runs inside your own app, in any browser, and as a Chrome extension for any site in Chrome and Edge. See [start](https://knobs.dev/docs/start) and [Chrome extension](https://knobs.dev/docs/extension). Chrome DevTools is free and part of Chrome, on every desktop system Chrome runs on. Its frontend is open source under the BSD-3-Clause license. | | knobs | Chrome DevTools | | --- | --- | --- | | Price | free | free, part of Chrome | | License | MIT | frontend under BSD-3-Clause | | Platform | npm package in any browser; extension for Chrome and Edge | Chrome on desktop | | Latest release | 0.7.6, November 26, 2026 | ships with Chrome; Stable 158.0.8127.37 on Mac, 2026-11-12 | #### Features | Feature | knobs | Chrome DevTools | | --- | --- | --- | | Device presets and frames | iPhone, Pixel, iPad and laptop, with maker bezels | presets in the Dimensions list; "Show device frame", art missing for some devices | | Several sizes at once | no: one viewport per page | one resizable viewport | | Dark mode | yes | yes, Rendering tab | | Reduced motion | yes, plus animation speed and replay | yes | | Contrast and forced colors | `prefers-contrast` and reduced transparency; no forced colors | `forced-colors`, `prefers-contrast`, `prefers-reduced-transparency` | | Vision simulation | protanopia, deuteranopia, tritanopia, achromatopsia, blur | blurred vision, reduced contrast, protanopia, deuteranopia, tritanopia, achromatopsia | | Text size | browser default font size, text spacing | not documented | | Locale | any language tag, `Intl` included | a Locale field in a custom location | | Right to left | yes | not documented | | Pseudolocalization | yes | not documented | | Time zone | any IANA zone | a Timezone ID in a custom location | | Fake date and clock | jump ahead, pick a date, freeze, speed up | not documented | | Geolocation | a city, your own coordinates, a route, errors | yes, Sensors | | User agent | yes | yes, Network conditions | | Network throttling | no: offline only, and `navigator.connection` values | Fast 3G, Slow 3G, offline, custom profiles | | Element copy for agents | html, components and source files | AI assistance chats about a selected element; needs sign-in, age 18 or over, a supported location, off by default | | Agent access | a window API for Playwright or the Chrome DevTools MCP | chrome-devtools-mcp (Apache-2.0), whose `emulate` tool sets color scheme, forced colors, geolocation, network conditions and CPU | | Runs inside your own page | yes, `npm i -D @vinena/knobs` | no, it is part of the browser | #### Where knobs is limited - knobs has no network throttling and no `forced-colors`. Chrome DevTools has both. - The knobs docs list what only the browser's devtools can do: device pixel ratio outside Chromium, `forced-colors`, high contrast and print media, trusted touch events and pinch, network throttling and a real offline, and the time zone of workers. See [limits](https://knobs.dev/docs/limits). #### How they work together These follow from the facts above: - The knobs extension hands some knobs to Chrome itself: text size, offline, color scheme, contrast, reduced motion, reduced transparency, the viewport and the user agent. See [Chrome extension](https://knobs.dev/docs/extension). - A coding agent can drive knobs through the Chrome DevTools MCP's `evaluate_script`. See [agents](https://knobs.dev/docs/agents). Each knob has its own page: [mobile simulator](https://knobs.dev/use/mobile-simulator), [dark mode](https://knobs.dev/use/dark-mode), [reduced motion](https://knobs.dev/use/reduced-motion), [time zone](https://knobs.dev/use/time-zone), [fake geolocation](https://knobs.dev/use/fake-geolocation) and [user agent switcher](https://knobs.dev/use/user-agent-switcher). #### Sources - knobs: [every knob](https://knobs.dev/docs/knobs), [Chrome extension](https://knobs.dev/docs/extension), [agents](https://knobs.dev/docs/agents), [limits](https://knobs.dev/docs/limits), [Chrome Web Store listing](https://chromewebstore.google.com/detail/knobs/cpdmafeojnbdnnhldafobkaajiemcidj) - Chrome DevTools: [device mode](https://developer.chrome.com/docs/devtools/device-mode), [emulate CSS media features](https://developer.chrome.com/docs/devtools/rendering/emulate-css), [rendering effects](https://developer.chrome.com/docs/devtools/rendering/apply-effects), [locations](https://developer.chrome.com/docs/devtools/settings/locations), [sensors](https://developer.chrome.com/docs/devtools/sensors), [user agent](https://developer.chrome.com/docs/devtools/device-mode/override-user-agent), [AI assistance](https://developer.chrome.com/docs/devtools/ai-assistance), [frontend code](https://github.com/ChromeDevTools/devtools-frontend), [chrome-de