Code morph

Pro

Code that edits itself between steps: kept tokens glide to their new places with FLIP, new ones fade in, removed ones fall away, with line highlights and a caption per step.

A recording of the component itself. With Pro you get its full source and it runs in your app.

What you get

  • Token-level LCS diff: unchanged code only moves
  • Built-in tokenizer and colours for TS, JS, JSON, CSS
  • Steps by buttons, arrow keys or autoplay
  • Line highlights and a caption per step
  • One TypeScript file in your project, yours to edit. No runtime package.
  • Keyboard, screen reader and reduced motion support; light and dark; your shadcn theme.

Install

npx shadcn@latest add @goodui-pro/code-morph

Needs a Pro license key in your registry config: two-minute setup. The file lands in components/goodui/code-morph.tsx.

More Pro components

Particle morph text

Thousands of particles assemble into a word in your own font, flee the pointer and spring home, then burst and condense into the next word in a left to right wave.

Pro

Animated terminal

A terminal window that plays a scripted session: commands type with human cadence and the odd corrected typo, then output streams in with spinners, uneven progress bars and coloured status lines.

Pro

Fluid cursor

A WebGL fluid simulation behind any content: ink follows the pointer, swirls, mixes and fades, a press drops a ring of ink, and it keeps stirring while the pointer rests.

Pro