StealThis .dev

Code Comparison

Side-by-side code diff viewer with syntax-highlighted added and removed lines. Green for additions, red for removals, with line numbers and a dark editor theme.

Open in Lab
css javascript vue svelte
Targets: TS JS HTML React Vue Svelte

Code

Code Comparison

A side-by-side code diff viewer that highlights differences between two code strings. Removed lines are shown in red on the left panel, added lines in green on the right panel, with line numbers and a dark editor aesthetic.

How it works

  1. Two code strings (before/after) are parsed line by line.
  2. A simple diff algorithm compares lines and marks them as added, removed, or unchanged.
  3. Lines are rendered into two panels with appropriate background colors and line number gutters.

Features

  • Side-by-side layout with synchronized scrolling
  • Green highlights for additions, red for removals
  • Monospace font with line numbers
  • File name headers on each panel