DiffViewer

DiffViewer Component

stable
Playground
Unified view
11 const a = 1;
2-const b = 2;
2+const c = 3;
Props
PropTypeDefaultValue
modeselectsplit | unified
languagetext
Default
Unified view
11 const a = 1;
2-const b = 2;
2+const c = 3;
Split
Split view
1hello
2world
1hello
2earth
Unified
Unified view
11 line 1
2-line 2
2+line 2 modified
33 line 3
4+line 4
PROPTYPEDEFAULTDESCRIPTION
languagetextLanguage label
modeselectDiff mode
Using DiffViewertsx
import { DiffViewer } from '@/components/DiffViewer'

<DiffViewer
  mode="..."
  language="..."
/>
Tokens Used
No design tokens detected