Skip to main content

Options

The Diff Value supports empty and removed source values, and renders either an inline or a block layout.

Empty and Removed Values

Omit or pass null for from to render (Empty) — there was no prior value. Omit or pass null for to to render the highlighted (Removed) label — the value was taken away entirely.

Layout

Layout defaults to inline for short values on a single line, and block — stacking from above to — once either side exceeds roughly 80 characters or contains a newline. Pass layout explicitly to override the automatic choice.

Behavior

The Diff Value is otherwise static; only its block layout can become interactive when text is truncated.

Truncation

In block layout, text beyond truncateLines (default 2) clips with a “Show more” control that expands it in place; an expanded side shows “Show less” to collapse it again. Each side truncates independently.

Keyboard Interaction

The diff itself is static text and is not part of the tab sequence. When block layout truncates a side, its “Show more” / “Show less” control is a standard button.
Last modified on July 24, 2026