DiffView
display
DiffView: a scrollable unified diff viewer with +/- line coloring
Terminal
$termuijs render diff-view
Installation
$ bunx termuijs add diff-view
Copies the source into src/components/diff-view/ and installs @termuijs/core, @termuijs/widgets.
Usage
ts
import { DiffView } from '@termuijs/widgets'ts
new DiffView(options: DiffViewOptions, style: Partial<Style> = {})API Reference
DiffView
| Prop | Type | Required | Description |
|---|---|---|---|
lines | DiffLine[] | required | — |
showLineNumbers | boolean | optional | — |
gutterWidth | number | optional | — |