TJ

T-002

Website Toolkit

A visual editor for any site in development: restyle its type, then hand an agent the patch.

Dev tool · July 2026

A small editor that sits on your page while you build it. You change the type and the colours in the browser, and it writes down what you changed as a patch for Claude Code, Cursor or any coding agent to apply to your source.

It exists because trying a font on the real page is quicker than describing it, and an agent does better with exact values than with words. Try it above: press the round button on the sample page.

Page
Fonts
A made-up site with the toolkit on it. Open it from the button on the page and change some type.

Your patch

Nothing yet. Change some type on the page above, and the patch it writes shows up here.

What it does

  • One button on your page, in its own Shadow DOM, so its styles and yours never meet. Drag it anywhere; press it and it opens into a panel.
  • Pick a text style the page uses, like H1, body or links, and change its font, size, weight, letter-spacing, line height and case, live. Google Fonts load as you pick them, with no key.
  • See every text colour, background and gradient on the page, with how often each is used, and change one everywhere at once.
  • It never touches your files. It writes down what changed: a selector, and the old and new values.
  • Copy that to Claude Code, Cursor or any agent, and it makes the change in your code.
  • For development only. Keep it behind a dev check.

Get it

It isn't on npm yet, and the name website-toolkit there is another package. Its repo is private for now, so it's built from there and added to an app by path.

Build
# in the toolkit's reponpm installnpm run build
Add it
# in your appnpm install -D path/to/claude-website-toolkit/packages/website-toolkit

The build writes ES modules, CommonJS and type definitions to the package's dist folder, so it works with any bundler.

Use it

Mount it once, at the root of your app, and only in development. In React it's a component; anywhere else it's one function call.

import { WebsiteToolkit } from "website-toolkit/react"; export default function App() {  return (    <>      <YourApp />      {process.env.NODE_ENV === "development" && <WebsiteToolkit />}    </>  );}

The React component has no "use client" line of its own, so in the Next.js App Router, render it from a file of yours that does.

On the server, where there's no page, initToolkit() does nothing and hands back a controller that does nothing. Called twice, the second call warns in the console and leaves the first one be.

Editing a page

The panel has two tabs, Typography and Colors. Each starts as a list of what the page uses; pick a row to edit it, and Back returns to the list. Every change shows on the page as you make it.

Typography

It looks for the text tags the page actually uses, with visible text in them, and lists one style for each, with its font, size and weight. It never lists a style the page doesn't have.

An edit applies to every element of that tag at once: change H1 and every h1 on the page changes.

  • Font. Search by name. It shows up to 60 matches at a time, each marked google or system.
  • Size. 8 to 160px, by slider or by typing.
  • Weight. 100 Thin to 900 Black.
  • Letter-spacing. -5 to 20px, in steps of 0.1.
  • Line height. 8 to 200px.
  • Text transform. None, uppercase, lowercase or capitalise.
H1 to H6BodyQuoteList itemLinkButtonLabelSmall

The font list is every Google Fonts family, bundled as a list of names, plus a few system stacks like System UI, Georgia and Courier New. In browsers that allow it, a button adds the fonts installed on your own machine, after the browser asks your permission.

Colours

It lists the page's text colours, solid backgrounds and gradients, most used first, each with how many elements use it. Text colours count only elements with text of their own.

Pick one and give it a new value with the colour picker or a hex code. Every element using that colour in that role changes with it. A gradient is edited as its CSS, then applied with Apply gradient.

The patch

Every edit goes into one list, and the Copy button at the bottom of the panel shows how many there are. Press it and the patch, in Markdown, goes to your clipboard.

  • Make some changes on the page.
  • Press Copy.
  • Paste it into your coding agent. Each block gives it a selector to search for and the exact change to make.
Example patch
# Website Toolkit — 2 pending edit(s) Apply each edit below to the project source. Every block gives a CSS selector to grep for, a best-effort source location, and the intended change (old → new). Prefer editing the source component/stylesheet over adding inline styles. ## 1. Typography — `h1`- Source: (unknown — grep the selector)- font-family: Georgia → Fraunces- font-size: 44px → 52px ## 2. Color (text color)- #555555 → #3a3a3a- affects ~1 element(s) using this text color

Changing the same style twice gives one edit with the latest value, not two. Set a type value back to where it started and its edit drops out of the patch.

The patch has a line for the source file. Edits from the panel cover a whole tag, so that line tells the agent to search for the selector instead.

How it works

  • Its own corner. The button and panel live in a Shadow DOM on one element added to the end of the page, above everything else. Its styles can't leak out, yours can't leak in, and it leaves its own UI out of everything it reads or changes.
  • Reads what the browser sees. Fonts, sizes and colours come from the computed styles, not your stylesheets, so it doesn't matter how they were written: Tailwind, CSS modules or plain CSS. It never samples image pixels.
  • Changes are inline styles. A preview is a style set on each element. Nothing is saved: reload the page and it's as your code has it.
  • Fonts on demand. Picking a Google Font adds one stylesheet link for it, in weights 300 to 800. Loading fonts that way needs no API key; only listing them would, which is why the names are bundled.
  • Glass. The panel is frosted glass. In Chromium browsers it also bends what's behind it, like a lens, with an SVG filter; elsewhere it's a plain blur.

Limits and privacy

  • It works per tag, not per element. A heading styled by a class shows up under its tag, and the patch names the tag.
  • There's no undo button. Set a value back, or reload the page to start over.
  • A Google Font comes in weights 300 to 800, so 100, 200 and 900 show the nearest of those.
  • It edits type and colour only. Text, spacing and layout are untouched.
  • Nothing leaves the page except a request to Google Fonts when you pick a Google Font. The patch goes to your clipboard, and the list of installed fonts stays in the page.
  • It's a development tool. It's meant to sit behind a dev check and never reach your users.

Requirements

  • A page in a browser. It runs on the client and needs a DOM.
  • React 18 or later for the React component. It's optional: the plain function needs no framework.
  • Node and npm to build it from its repo.
  • A Chromium browser for the installed-fonts button and the glass refraction. Everything else works in any modern browser.

Reference

Options
const toolkit = initToolkit({  fonts: ["Inter", "Poppins"], // only these in the picker  onChange: (changes) => {},   // on every edit  onExport: (markdown) => {},  // when it's copied}); toolkit.getChanges(); // the edits, as datatoolkit.toMarkdown(); // the patch, for an agenttoolkit.clear();toolkit.destroy();
fontsstring[]
Default: all Google and system fonts
Only these families in the picker. A name that matches a system stack uses it; any other is loaded from Google Fonts. Setting it hides the installed-fonts button.
onChange(changes: Change[]) => void
Called with every pending edit whenever the list changes.
onExport(markdown: string, changes: Change[]) => void
Called when you press Copy, after it tries to write the patch to the clipboard.
onSave(changes, markdown) => void | Promise<void>
Adds a Save button next to Copy. The toolkit doesn't write files itself, so wire it to something of yours, like a dev-only endpoint. Return a promise and the button shows Saving, then Saved or Failed.
getChanges()Change[]
The pending edits, as data: typography edits with a selector and old and new values, and colour edits with a role, old and new values and a count.
toMarkdown()string
The patch, the same Markdown Copy gives you. With no edits it's No pending edits.
clear()void
Empties the patch. It doesn't undo the changes on the page; reload for that.
destroy()void
Removes the button and panel. Changes already on the page stay until it reloads.
<WebsiteToolkit />ToolkitOptions
From website-toolkit/react. Takes the same options as props, reads them once when it mounts, renders nothing of its own, and removes the toolkit when it unmounts.
GOOGLE_FONTSstring[]
The bundled list of Google Fonts family names.
SYSTEM_FONTSFontOption[]
The system stacks it offers, each with a name and its full font-family value.

Ideas

  • Restyle a page by voice: "make it calmer".
  • Two people restyling one page at once, cursors and all.
  • Pick a palette from any image on the page.

Want one of these, or something wilder? Let's make it.