Skip to content
DataBrowse data components
ComponentsDataNew in 0.2

Diff

Inline diff view with +/− line markers and tinted background.

Live preview

tokens.css
--lm-radius-md: 0.375rem;
--lm-radius-md: 0.5rem;

Usage

Adapters:React stableVue stable
index.html
<div class="lm-diff">
  <div class="lm-diff-line lm-diff-line-add"><span></span><span> new line</span></div>
</div>

CSS classes (5)

ClassDescription
lm-diffBordered container
lm-diff-lineSingle line row
lm-diff-line-addGreen + line
lm-diff-line-removeRed − line
lm-diff-line-meta@ context line

Accessibility

  • Provide visible +/− markers (not just color).

Spotted something wrong? Edit this entry on GitHub.