구성 요소 다크 모드 탭 구성 요소

다크 모드 탭 구성 요소

Tailwind CSS를 활용하여 다크 모드를 염두에 두고 설계된 반응형 탭 구성 요소입니다.

미리 보기

HTML 코드

<div class="bg-gray-900 text-white rounded-lg p-4">
  <div class="flex space-x-2">
    <button class="tab-button active bg-gray-700 rounded-lg px-4 py-2 focus:outline-none">Tab 1</button>
    <button class="tab-button bg-gray-700 rounded-lg px-4 py-2 focus:outline-none">Tab 2</button>
    <button class="tab-button bg-gray-700 rounded-lg px-4 py-2 focus:outline-none">Tab 3</button>
  </div>
  <div class="tab-content mt-4">
    <div class="content active">
      <h2 class="text-lg font-semibold">Content for Tab 1</h2>
      <img src="https://picsum.photos/400/200?random=1" alt="Random placeholder" class="mt-2 rounded-lg">
      <p class="mt-2">This is the content for the first tab. Here you can add more information, images, etc.</p>
    </div>
    <div class="content hidden">
      <h2 class="text-lg font-semibold">Content for Tab 2</h2>
      <img src="https://picsum.photos/400/200?random=2" alt="Random placeholder" class="mt-2 rounded-lg">
      <p class="mt-2">This is the content for the second tab. More details can be added here.</p>
    </div>
    <div class="content hidden">
      <h2 class="text-lg font-semibold">Content for Tab 3</h2>
      <img src="https://picsum.photos/400/200?random=3" alt="Random placeholder" class="mt-2 rounded-lg">
      <p class="mt-2">Here is the content for the third tab, where additional insights can be included.</p>
    </div>
  </div>
</div>
<style>
  .tab-button.active {
    background-color: #1f2937;
    border: 1px solid #4b5563;
  }
  .tab-button:hover {
    background-color: #374151;
  }
  .content.hidden {
    display: none;
  }
  .content.active {
    display: block;
  }
</style>

관련 구성 요소

탭 구성 요소

Tailwind CSS를 사용하여 다크 모드용으로 설계된 반응형 탭 구성 요소입니다. 사용자가 클릭하여 콘텐츠를 표시할 수 있는 다양한 탭과 함께 자리 표시자 이미지 및 아바타가 있습니다.

열다

탭 구성 요소

비즈니스/기업 웹 사이트를 위한 마이크로 상호 작용이 있는 반응형 탭 구성 요소로, 보색과 다크 모드 지원을 제공합니다.

열다

아트데코탭컴포넌트

아르데코 미학이 가미된 복잡하고 반응이 빠른 탭 구성 요소로, 사진 포트폴리오를 위해 설계되었으며, 기업 블루 톤과 다크 모드 지원을 특징으로 합니다.

열다