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>
관련 구성 요소
기업프로페셔널아코디언
고대비의 기업/전문가 테마의 아코디언 구성 요소는 비영리 및 자선 단체에 적합합니다. 깔끔한 디자인, 대담한 색상 조합, 다크 모드 지원으로 완벽한 반응성이 특징입니다.
비영리 단체를 위한 Bauhaus Accordion
Bauhaus의 영향으로 디자인된 단순하고 반응성이 뛰어난 아코디언 구성 요소와 따뜻한 일몰 색 구성표로 비영리 단체에 적합합니다. 다크 모드 지원이 포함됩니다.
머티리얼 디자인 아코디언 컴포넌트 - Tailwind CSS
반응형 효과 및 어두운 테마 지원을 포함한 Material Design 스타일의 아코디언 구성 요소입니다. Tailwind CSS를 사용하고 자리 표시자 이미지/아바타를 포함합니다.