디프/비교
디프/비교 (Diff)
Diff 컴포넌트는 두 항목을 나란히 비교해 보여주는 컴포넌트예요.
출처: 문서
본문
Diff 컴포넌트는 두 항목을 나란히 비해서 보여줘요.
| 클래스명 | 타입 | 설명 |
|---|---|---|
| diff | 컴포넌트 | 컨테이너 요소 |
| diff-item-1 | 파트 | 첫 번째 항목 |
| diff-item-2 | 파트 | 두 번째 항목 |
| diff-resizer | 파트 | 리사이저 컨트롤 |
Diff
<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 텍스트
<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>
더 알아보기 (Learn more)
daisyUI의 Diff 컴포넌트와 diff-item-1, diff-item-2, diff-resizer 파트 구성법에 대해 더 알아보세요. 이미지나 텍스트 등 어떤 콘텐츠든 나란히 비교할 수 있어요.