Files
email-organizer/offline-docs/daisyui/diff.md
2025-08-13 09:33:19 -07:00

42 lines
1.3 KiB
Markdown

# daisyUI Documentation - Diff Component
Diff component shows a side-by-side comparison of two items.
## Examples
### Basic Diff
```html
<figure class="diff aspect-16/9" tabindex="0">
<div class="diff-item-1" role="img" tabindex="0">
<img alt="daisy" src="https://img.daisyui.com/images/stock/photo-1560717789-0ac7c58ac90a.webp" />
</div>
<div class="diff-item-2" role="img">
<img alt="daisy" src="https://img.daisyui.com/images/stock/photo-1560717789-0ac7c58ac90a-blur.webp" />
</div>
<div class="diff-resizer"></div>
</figure>
```
### Diff with Text
```html
<figure class="diff aspect-16/9" tabindex="0">
<div class="diff-item-1" role="img" tabindex="0">
<div class="bg-primary text-primary-content grid place-content-center text-9xl font-black">DAISY</div>
</div>
<div class="diff-item-2" role="img">
<div class="bg-base-200 grid place-content-center text-9xl font-black">DAISY</div>
</div>
<div class="diff-resizer"></div>
</figure>
```
## Features
- Shows side-by-side comparison of two items
- Can be used with images or text content
- Includes a resizer for adjusting the split point
- Responsive design
This component is useful for showing before/after comparisons, side-by-side content analysis, or visual differences between elements.