Component packs › Mono › Diff Morph

Diff Morph

Switch to After and kept lines glide to their new places, removed lines tint and fold away left, and added lines open up and slide in.

Diff Morph is a code diff from Mono, a component pack with 6 code components: Code UI where changes move: diffs slide lines in and out, and the terminal runs its script. Price: $2 for the whole pack.

Built with: LCS line diff, FLIP motion, +/− gutter.

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.

Diff Morph props

PropTypeDefaultDescription
beforestring
afterstring
langMzLang
filenamestring
labelstring
darkboolean
autoplaynumber | falseShowcase mode: flips between before and after every N ms while visible.

Methods on the ref

Use it in React

import DiffMorph from './DiffMorph';

<DiffMorph />

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

More in Mono

Good for: Code blocks.