Code Comparison

One sheet of code, two moments in time: a draggable vertical seam slides the after state across the before state like a light table. Removed lines tinted toward destructive, added lines lit by the warm accent wash. The seam sweeps in from the right edge on first view.

Draw

npx shadcn@latest add @clow/code-comparison

Playground

props
<CodeComparison />

Examples

basic

Props

proptypedefault
filenametextrelay.tsx
beforeTitletextbefore
afterTitletextafter
defaultPositionnumber12
beforeCodetext- const glow = "#e8590c" - <button style={{ color: glow }}> open uplink - </button>
afterCodetext+ import { Button } from "@clow/button" + <Button variant="accent"> open uplink + </Button>