구성 요소 캐러셀 슬라이더 고정공간 캐러셀 슬라이더 구성 요소

고정공간 캐러셀 슬라이더 구성 요소

블로그/콘텐츠 표시를 위한 단순하고 깔끔한 고정 공간 스타일의 캐러셀 슬라이더 구성 요소로, 다크 모드를 포함하여 유사한 색 구성표와 완전한 응답성으로 설계되었습니다.

미리 보기

HTML 코드

<div class="relative w-full max-w-4xl mx-auto py-8 font-mono text-gray-800 dark:text-gray-200 bg-gray-50 dark:bg-gray-900 rounded-lg shadow-lg overflow-hidden">
  <h2 class="text-2xl font-bold text-center mb-6 px-4 text-emerald-700 dark:text-emerald-300">[CODE] Latest Articles [/]</h2>

  <!-- Carousel Wrapper -->
  <div class="flex overflow-x-scroll snap-x snap-mandatory scrollbar-hide space-x-4 px-4 pb-4 md:scroll-auto md:overflow-x-hidden md:flex-wrap md:justify-center">
    <!-- Slice 1 -->
    <div class="flex-none w-64 md:w-80 lg:w-96 snap-center bg-white dark:bg-gray-800 rounded-lg shadow-md p-4 border border-emerald-200 dark:border-emerald-600 transition-all duration-300 hover:shadow-xl">
      <img class="w-full h-32 md:h-40 object-cover rounded-md mb-3 border border-emerald-100 dark:border-emerald-700" src="https://picsum.photos/400/250?random=1" alt="Article Image 1">
      <div class="text-xs text-emerald-600 dark:text-emerald-400 mb-1">[TAG] WebDev [/]</div>
      <h3 class="text-lg font-semibold mb-2 text-emerald-800 dark:text-emerald-200">// From Dev to Deploy: A Journey</h3>
      <p class="text-sm text-gray-700 dark:text-gray-300 line-clamp-3">Exploring the intricate pipeline from writing the first line of code to seeing it live in production...</p>
      <button class="mt-4 text-sm font-semibold text-emerald-700 dark:text-emerald-300 hover:underline">
        > READ MORE
      </button>
    </div>

    <!-- Slice 2 -->
    <div class="flex-none w-64 md:w-80 lg:w-96 snap-center bg-white dark:bg-gray-800 rounded-lg shadow-md p-4 border border-emerald-200 dark:border-emerald-600 transition-all duration-300 hover:shadow-xl">
      <img class="w-full h-32 md:h-40 object-cover rounded-md mb-3 border border-emerald-100 dark:border-emerald-700" src="https://picsum.photos/400/250?random=2" alt="Article Image 2">
      <div class="text-xs text-emerald-600 dark:text-emerald-400 mb-1">[TAG] AI & ML [/]</div>
      <h3 class="text-lg font-semibold mb-2 text-emerald-800 dark:text-emerald-200">// The Rise of Generative Models</h3>
      <p class="text-sm text-gray-700 dark:text-gray-300 line-clamp-3">Delving into the exciting world of AI's generative capabilities and their impact on creativity and industry...</p>
      <button class="mt-4 text-sm font-semibold text-emerald-700 dark:text-emerald-300 hover:underline">
        > READ MORE
      </button>
    </div>

    <!-- Slice 3 -->
    <div class="flex-none w-64 md:w-80 lg:w-96 snap-center bg-white dark:bg-gray-800 rounded-lg shadow-md p-4 border border-emerald-200 dark:border-emerald-600 transition-all duration-300 hover:shadow-xl">
      <img class="w-full h-32 md:h-40 object-cover rounded-md mb-3 border border-emerald-100 dark:border-emerald-700" src="https://picsum.photos/400/250?random=3" alt="Article Image 3">
      <div class="text-xs text-emerald-600 dark:text-emerald-400 mb-1">[TAG] Cybersecurity [/]</div>
      <h3 class="text-lg font-semibold mb-2 text-emerald-800 dark:text-emerald-200">// Securing Your Digital Fortress</h3>
      <p class="text-sm text-gray-700 dark:text-gray-300 line-clamp-3">Best practices and essential tools for protecting your data and privacy in an increasingly connected world...</p>
      <button class="mt-4 text-sm font-semibold text-emerald-700 dark:text-emerald-300 hover:underline">
        > READ MORE
      </button>
    </div>

    <!-- Slice 4 (hidden on smaller screens, appears on md and up) -->
    <div class="hidden md:flex flex-none w-64 md:w-80 lg:w-96 snap-center bg-white dark:bg-gray-800 rounded-lg shadow-md p-4 border border-emerald-200 dark:border-emerald-600 transition-all duration-300 hover:shadow-xl">
      <img class="w-full h-32 md:h-40 object-cover rounded-md mb-3 border border-emerald-100 dark:border-emerald-700" src="https://picsum.photos/400/250?random=4" alt="Article Image 4">
      <div class="text-xs text-emerald-600 dark:text-emerald-400 mb-1">[TAG] Cloud Computing [/]</div>
      <h3 class="text-lg font-semibold mb-2 text-emerald-800 dark:text-emerald-200">// Serverless Architectures Explored</h3>
      <p class="text-sm text-gray-700 dark:text-gray-300 line-clamp-3">A deep dive into the benefits and challenges of building applications without managing servers...</p>
      <button class="mt-4 text-sm font-semibold text-emerald-700 dark:text-emerald-300 hover:underline">
        > READ MORE
      </button>
    </div>
  </div>

  <!-- Scroll Indicator for mobile (optional visual flair) -->
  <div class="block md:hidden text-center text-xs text-gray-500 dark:text-gray-400 mt-4 px-4">
    &lt; SCROLL FOR MORE &gt;
  </div>

  <!-- Tailwind Typography plugin classes are used for line-clamp. If you don't have this plugin installed, 
       replace line-clamp-3 with fixed height and hidden overflow, e.g., 'h-16 overflow-hidden' -->

  <!-- To make the scrollbar-hide work, you need to install the Tailwind CSS Scrollbar Hiding Plugin: -->
  <!-- npm install tailwindcss-scrollbar-hide -->
  <!-- Then add it to your tailwind.config.js: -->
  <!-- plugins: [require('tailwindcss-scrollbar-hide')] -->
</div>

관련 구성 요소

Carousel Slider 구성 요소

그라데이션 색상 전환이 있는 반응형 캐러셀 슬라이더 구성 요소로, 패션 및 뷰티 브랜드를 위해 설계되었습니다. 다크 모드 지원과 세련되고 모던한 디자인이 특징입니다.

열다

Brutalism Carousel 슬라이더 구성 요소

Brutalism Carousel Slider는 Tailwind CSS, 응답성 및 다크 모드를 제공합니다. 탐색 단추를 포함하고 자리 표시자 이미지를 사용합니다.

열다

Glassmorphism 캐러셀 슬라이더

블로그 및 컨텐츠 소비에 적합한 glassmorphism 스타일을 가진 반응형 캐러셀 슬라이더 구성 요소입니다. 여러 콘텐츠 슬라이드, 젖빛 유리와 같은 요소를 특징으로 하며 밝은 테마와 어두운 테마 모두에 맞게 설계되었습니다.

열다