PyraUI logo
PyraUI
Docs
Home Docs Components Roadmap Playground GitHub
Launch Playground
Playground
Browse Components 70
Accordion Alert Animated Chart Autocomplete Avatar Avatar Group Badge Badge Card Breadcrumbs Button Card Carousel Chart Color Picker Conditional Form Connections Widget Countdown DatePicker Diff Dock Drawer File Upload Filter Panel Gantt Chart Gauge Grid Heatmap Hero Input Installation Introduction Kanban Board Kbd Lightbox Link List Live Chat Live Data Table Live Feed Map Masonry Grid Mockup Modal Multi-Select Navbar Password Strength Meter Progress Rating Resizable Panels Rich Text Editor Select Signature Pad Skeleton Skeleton Layout Slider Sortable List Stats Stepper Swap Table Tabs Tag Input Theme Config Theme Switch Timeline Toast Usage User Profile Card Video Player Wizard

Diff

Diff component for side-by-side comparison of two items (text, code, etc.).

Text Diff

Before
Old content that needs to be changed
After
New content that replaces the old

          <.diff left="Old content" right="New content" />
        

Code Diff

Before
function old() {\n return 'old';\n}
After
function new() {\n return 'new';\n}

Props

Prop Type Default Description
left string - Left side content
right string - Right side content
type atom :text Content type (:text or :code)

We can't find the internet

Attempting to reconnect

Something went wrong!

Attempting to reconnect