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-comparisonPlayground
props
<CodeComparison />Examples
basic
Props
| prop | type | default |
|---|---|---|
| filename | text | relay.tsx |
| beforeTitle | text | before |
| afterTitle | text | after |
| defaultPosition | number | 12 |
| beforeCode | text | - const glow = "#e8590c" - <button style={{ color: glow }}> open uplink - </button> |
| afterCode | text | + import { Button } from "@clow/button" + <Button variant="accent"> open uplink + </Button> |