WingoUI
Buttons & Actions
ButtonButton GroupCopy ButtonDelete ButtonTheme ToggleToggleToggle Group
Inputs
Avatar UploadCalendarCheckboxColor PickerComboboxCron PickerCurrency InputDate PickerDate Range PickerDate Time PickerDuration PickerFile UploadFilter BuilderInputInput GroupListboxMasked InputMention InputMonth PickerMulti SelectNumber InputOTP InputPassword InputPhone InputRadio GroupRatingSearch InputSegmented ControlSelectSignature PadSliderSwitchTag InputTextareaTime Picker
Forms
Address InputCSV ImportFieldForm WizardInline EditInvoice line itemsRich Text Editor
Navigation
Back To TopBounce SidebarBreadcrumbCommand MenuGlobal SearchGooey NavHook SidebarNav MenuNav TabsPaginationProximity SidebarScroll ProgressSidebarStepsTable Of ContentsTabsTopbarUser MenuWorkspace Switcher
Overlays
Alert DialogContext MenuDialogDrawerDropdown MenuFamily DrawerHover CardPopoverSheetShortcuts DialogTooltipTour
Feedback
AlertBannerCookie ConsentEmoji ReactionEmpty StateNotification BellNotification CenterProgressRoute ProgressSkeletonSpinnerToast
Data Display
Approval FlowAvatarBadgeCalendar ViewCode BlockComment ThreadContact cardCountdownDescription ListDiff ViewerFile ListFile managerFolderGanttJSON ViewerKbdLog ViewerMarkdownPresenceSchedulerTagTimelineTree View
Tables & Lists
Audit LogData TableDeal PipelineEditable GridKanbanListMembers tablePermissions MatrixTableTask ListVirtual List
Charts & Stats
Animated CounterArea chartBar chartDonut chartFunnel chartGaugeGitHub ActivityHeatmap calendarLeaderboardLine chartRadial barSparklineStat CardTrackerTrend badge
Layout
AccordionApp ShellCardCollapsibleDetail LayoutEntity HeaderPage HeaderScroll AreaSeparatorSettings LayoutSplit ViewToolbar
Media
Audio PlayerCarouselImage CropperImage LightboxLocation MapQR CodeStep PlayerVideo Player
AI Kit
Agent Status CardChat MessageChat ThreadConversation ListFluid OrbGrid RevealMatrix OrbModel PickerPrompt InputReasoning IndicatorRule BuilderSuggestion ChipsTool Call TimelineUsage MeterVoice InputWorkflow Canvas
Text & Effects
Gravity Letters
Mobile
Action SheetBottom Tab BarFABHaptic ButtonHero HeaderInstall PromptLarge Title HeaderNotification BannerOnboarding CarouselPicker WheelPull To RefreshSlide To ConfirmSticky CTA BarSwipe DeckSwipeable Tabs
Commerce
Cart drawerCategory pickerCheckout stepsCoupon inputFavorite buttonFilter panelListing cardListing gridOrder trackerPricePrice rangePricing tableProduct galleryQuantity stepperReviewsSeller card
Blocks
Admin Dashboard PageAdmin ShellAI Chat PageAutomation Builder PageCheckout PageCRM Contact PageCRM Pipeline PageError PagesInbox PageInvoice PageKPI DashboardListing Detail PageLogin PageMarketplace Home PageMarketplace Search PageMarketplace ShellMobile App HomeOnboarding FlowPost Listing WizardPricing PageRegister PageSettings PageUsers Admin Page
Hooks & Utilities
AI ChatChart kitCommerceDate utilsFile exportFile typesFiltersForm validationHapticsInvoicingMotion presetsNavigationNumber formatRelative timeRomanian locationsSpreadsheetText matchTonesUIProvideruseClipboarduseConsentuseControllableStateuseCooldownuseDebounceuseKeyboardInsetuseLocaleuseLongPressuseMediaControlsuseMediaQueryuseOverflowItemsusePersistedStateuseScrollEdgesuseScrollStateuseSelectionuseShortcutuseStickToBottom
GalleryThemeCredits

Data Display

Diff Viewer

Data DisplayDiff Viewer
Description ListFile List
Live props
Content
oldValue
newValue
oldTitle
newTitle
State
defaultView
Appearance
granularity
lineNumbers
language
showStats
toolbar
size
radius
Layout
contextLines3 lines
wrap
maxHeight560px
Behavior
ignoreWhitespace
ignoreCase
Code
import { DiffViewer } from "@/components/ui/diff-viewer"

<DiffViewer />
Pro

v1.0.0·Added in 1.0.0

Shows what changed between two texts: split or unified, word highlights, collapsed context, syntax colors and jumps between changes.

Read the change at a glance: removed lines are tinted red with a minus, added lines green with a plus, and the words that changed inside a line are marked. Wide screens show the two versions side by side; phones (and the server render) show one unified column, and the switch in the toolbar, or the ⋯ menu on a phone (a bottom sheet), flips between them with a short crossfade. Long runs of unchanged lines fold into a row that says how many lines hide there: tap it to show them all, or use the arrows beside it to reveal 20 at a time; the new rows fade in. The chevron buttons, or Alt+Down and Alt+Up while focus is anywhere inside the viewer, scroll to the next or previous change, focus it and flash it briefly (no flash with reduced motion), wrapping around at the ends; a screen reader hears Change 2 of 5. The ⋯ menu copies either version and toggles line wrapping, ignoring whitespace and ignoring case; the copy buttons in the column headers do the same per side. Lines scroll sideways inside the viewer with the line numbers pinned, the body scrolls with the keyboard once focused, and every changed line carries a spoken added or removed label.

Add to a project

npx wingo-ui@latest add diff-viewer

Pro item: the CLI needs a Pro account. See plans

Dependencies

diffprism-react-renderermotionlucide-reactbadgebuttoncopy-buttondropdown-menusegmented-controltooltipuse-clipboarduse-controllable-stateuse-media-querymotionui-config

Files

  • components/ui/diff-viewer.tsx

See also

Code BlockJSON ViewerAudit LogCopy ButtonSegmented Control
PreviousDescription ListNext File List
+7−65 changes
Differences between Agreement v3 · Sep 12, 2026 and Agreement v4 · Sep 24, 2026: 7 additions, 6 deletions
−Agreement v3 · Sep 12, 2026→+Agreement v4 · Sep 24, 2026
44​
55## Art. 4. Scope of the agreement
66The Provider licenses, sets up and maintains the Acme CRM platform
7−removed: for 25 users, as listed in Appendix 1.
7+added: for 40 users, as listed in Appendix 1.
88Services are delivered remotely, on business days, between 9:00 AM and 6:00 PM.
99​
1010## Art. 5. Payment
11−removed: Monthly fee: $4,990 plus sales tax
12−removed: The Client pays each invoice within 15 days of receiving it.
13−removed: Payment is made by bank transfer or in cash at the Provider's office.
11+added: Monthly fee: $6,490 plus sales tax
12+added: The Client pays each invoice within 30 calendar days of the issue date,
13+added: by bank transfer to account 4839 2017 5 (routing 021000021) at Chase.
1414Late payment accrues a penalty of 0.1% per day of the amount due, capped at the value of the overdue invoice.
1515​
1616## Art. 6. Term
2323The obligation stays in force for 2 years after the agreement ends.
2424Public information and information required by a competent authority are not confidential.
2525​
26−removed: ## Art. 8. Force majeure
26+added: ## Art. 8. Force majeure
2727Force majeure releases the party that invokes it from liability, as provided by law.
2828The affected party notifies the other party within 5 days of the event.
2929​
3030## Art. 9. Disputes
31−removed: DISPUTES are settled amicably or, failing that, by the courts of Cook County, Illinois.
31+added: Disputes are settled amicably or, failing that, by the courts of Cook County, Illinois.
3232​
3333## Art. 10. Final provisions
3434This agreement was signed in two copies, one for each party.
35+added: Appendices 1 and 2 are an integral part of the agreement.

defaultView="auto" · Alt+↓ / Alt+↑ jump between changes