Show a change between two texts, unified or side by side, with changed words marked.
View as MarkdownInstallation
Component API
| Prop | Type | Default | Description |
|---|---|---|---|
before | string | - | The text before the change. |
| The text before the change. | |||
after | string | - | The text after it. |
| The text after it. | |||
filename | string | - | The file's name in the header. |
| The file's name in the header. | |||
defaultView | unified | split | unified | One column with removed lines over added ones, or the two sides next to each other. |
| One column with removed lines over added ones, or the two sides next to each other. | |||
context | number | 2 | Unchanged lines kept around each change; longer runs fold behind a button. |
| Unchanged lines kept around each change; longer runs fold behind a button. | |||
shape | none | rounded | pill | rounded | |
className | string | - | |
focus | boolean | string | true | |