easeUI

Diff View

A line-by-line diff with an added or removed mark in the gutter and a tinted row for each side. Renders a diff, doesn't compute one.

cart.ts
export function total(items) {
return items.reduce((a, b) => a + b)
return items.reduce((a, b) => a + b, 0)
}

Installation

$ bunx --bun shadcn add @easeui/diff-view

API reference

PropTypeDefaultDescription
lines{}-Pre-computed diff lines. This renders a diff, it doesn't compute one.
label?stringdiffShown in the header, such as a filename. Default "diff".
className?string--

Updated