HTML 코드
<div class="w-full max-w-md mx-auto rounded-lg overflow-hidden">
<div class="bg-gray-800 text-gray-200 p-4 cursor-pointer flex justify-between items-center" onclick="this.nextElementSibling.classList.toggle('hidden')">
<span>Section 1</span>
<svg class="w-5 h-5 transform transition-transform duration-200" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
</svg>
</div>
<div class="p-4 bg-gray-700 hidden">
<p>Content for section 1.</p>
</div>
<div class="bg-gray-800 text-gray-200 p-4 cursor-pointer flex justify-between items-center" onclick="this.nextElementSibling.classList.toggle('hidden')">
<span>Section 2</span>
<svg class="w-5 h-5 transform transition-transform duration-200" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
</svg>
</div>
<div class="p-4 bg-gray-700 hidden">
<p>Content for section 2.</p>
</div>
<div class="bg-gray-800 text-gray-200 p-4 cursor-pointer flex justify-between items-center" onclick="this.nextElementSibling.classList.toggle('hidden')">
<span>Section 3</span>
<svg class="w-5 h-5 transform transition-transform duration-200" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path>
</svg>
</div>
<div class="p-4 bg-gray-700 hidden">
<p>Content for section 3.</p>
</div>
</div>
관련 구성 요소
레트로아코디언심플
비즈니스 웹 사이트를 위한 간단하고 반응이 빠른 레트로 테마의 아코디언 구성 요소로, Tailwind CSS를 사용하여 다크 모드를 지원합니다. 이 구성 요소는 트라이어딕 색 구성표를 사용하며 JavaScript가 필요하지 않습니다.