구성 요소 맨 위로 이동 버튼 맨 위로 이동 버튼 구성 요소

맨 위로 이동 버튼 구성 요소

종이/인쇄물에서 영감을 받은 디자인, 트라이어딕 색 구성표 및 복잡한 시각적 요소를 갖춘 반응형 'Back to Top' 버튼 구성 요소로 전자 상거래 사이트에 적합합니다. 다크 모드 지원이 포함됩니다.

미리 보기

HTML 코드

<div class="fixed bottom-4 right-4 z-50">
  <!-- Back to Top Button -->
  <a href="#top" aria-label="Back to top" class="group relative flex items-center justify-center p-2 sm:p-3 bg-indigo-500 hover:bg-indigo-600 focus:outline-none focus:ring-4 focus:ring-indigo-300 dark:bg-emerald-600 dark:hover:bg-emerald-700 dark:focus:ring-emerald-800 rounded-full shadow-lg transition-all duration-300 ease-in-out transform hover:scale-110 active:scale-95 overflow-hidden border-2 border-indigo-700 dark:border-emerald-800 animate-bounce-slow">
    <!-- Paper Fold Effect - Top Right -->
    <div class="absolute top-0 right-0 w-0 h-0 border-t-[10px] border-l-[10px] sm:border-t-[15px] sm:border-l-[15px] border-solid border-transparent border-t-indigo-700 dark:border-t-emerald-800 transform rotate-45 translate-x-[4px] -translate-y-[4px] sm:translate-x-[6px] sm:-translate-y-[6px] group-hover:scale-125 transition-transform duration-300"></div>
    <div class="absolute top-0 right-0 w-0 h-0 border-t-[10px] border-l-[10px] sm:border-t-[15px] sm:border-l-[15px] border-solid border-transparent border-t-white dark:border-t-gray-900 opacity-20 transform rotate-45 translate-x-[6px] -translate-y-[6px] sm:translate-x-[9px] sm:-translate-y-[9px] group-hover:opacity-30 transition-opacity duration-300"></div>

    <!-- Print Lines Texture -->
    <div class="absolute inset-0 bg-[length:16px_16px] opacity-10 dark:opacity-15" style="background-image: repeating-linear-gradient(45deg, transparent, transparent 1px, rgba(255,255,255,0.1) 1px, rgba(255,255,255,0.1) 2px);"></div>
    <div class="absolute inset-0 bg-[length:16px_16px] opacity-10 dark:opacity-15" style="background-image: repeating-linear-gradient(-45deg, transparent, transparent 1px, rgba(0,0,0,0.1) 1px, rgba(0,0,0,0.1) 2px);"></div>

    <!-- Inner Shadow for depth -->
    <div class="absolute inset-0 rounded-full shadow-[inset_0_0_8px_rgba(0,0,0,0.3)] dark:shadow-[inset_0_0_8px_rgba(0,0,0,0.5)]"></div>

    <!-- Icon with subtle 3D effect -->
    <svg class="h-6 w-6 sm:h-8 sm:w-8 text-white dark:text-gray-900 filter drop-shadow-[0_1px_1px_rgba(0,0,0,0.4)] dark:drop-shadow-[0_1px_1px_rgba(255,255,255,0.1)] transition-transform duration-300 group-hover:-translate-y-1" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
      <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 10l7-7m0 0l7 7m-7-7v18"></path>
    </svg>

    <!-- Subtle shine effect on hover -->
    <div class="absolute inset-0 rounded-full opacity-0 group-hover:opacity-100 transition-opacity duration-300" style="background: radial-gradient(circle at 50% 0, rgba(255,255,255,0.3) 0%, transparent 70%);"></div>

    <!-- Hidden text for screen readers (optional, could be replaced by aria-label) -->
    <span class="sr-only">Back to Top</span>
  </a>
</div>

<!-- Just for demonstration purposes to show the button in action -->
<!-- Add a large div to allow scrolling -->
<div id="top" class="min-h-[200vh] bg-neutral-100 dark:bg-gray-800 p-8">
  <h1 class="text-4xl font-bold text-gray-900 dark:text-white mb-4">Scroll Down to See the Button</h1>
  <p class="text-gray-700 dark:text-gray-300">This is placeholder content to make the page scrollable.</p>
  <div class="h-[140vh] flex items-end justify-center">
    <p class="text-gray-700 dark:text-gray-300">Scroll more to truly appreciate the button's presence!</p>
  </div>
</div>

관련 구성 요소

맨 위로 이동 버튼 구성 요소

포트폴리오 웹 사이트에 적합한 Tailwind CSS를 사용하여 브루탈리즘 스타일로 디자인된 간단한 맨 위로 돌아가기 버튼입니다. 회색조 색 구성표와 어두운 테마 지원이 특징입니다.

열다

맨 위로 이동 단추

마이크로 상호 작용이 있는 Back to Top 버튼 구성 요소, 흙색 색 구성표, 비즈니스/기업 웹사이트를 위한 간단한 레이아웃; Tailwind CSS를 사용하여 다크 모드를 지원하는 반응형 디자인

열다

맨 위로 이동 버튼 구성 요소

미니멀하고 평평한 Back to Top Button Component는 대시보드를 위한 것으로, 단색 색 구성표를 특징으로 합니다. 인터랙티브 기능, 반응형 디자인, 어두운 테마 지원으로 적당히 복잡하며 순전히 HTML 및 Tailwind CSS로 구축되었습니다.

열다