Component packs › Muse › Version Switcher

Version Switcher

Step between regenerated drafts and the answer is edited into the next one, showing only what differs.

Version Switcher is a pager from Muse, a component pack with 6 AI writing components: AI writing controls that show every change as an edit you can read and trace. Price: $2 for the whole pack.

Built with: draft to draft diff, regenerate, pager.

Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.

Version Switcher props

PropTypeDefaultDescription
promptstringThe prompt shown above the answer.
versionsstring[]Drafts available at the start.
regenerate(current: string) => string | Promise<string>from a short built-in listReturns a new draft (or a promise of one). Default: from a short built-in list.
onChange(index: number, text: string) => void
autoplaynumber | falseShowcase mode: steps through drafts every N ms while visible.

Methods on the ref

Use it in React

import VersionSwitcher from './VersionSwitcher';

<VersionSwitcher />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Muse

Good for: AI writing UI.