Components Back to Top Button Back to Top Button Component

Back to Top Button Component

A responsive, visually appealing 'Back to Top' button with a triadic color scheme, gradient, and smooth transitions, suitable for a portfolio site, including dark mode support.

Preview

HTML Code

<div class="fixed bottom-6 right-6 z-50">
  <!-- The button is initially hidden and would be revealed by JS on scroll -->
  <!-- For demonstration, it's always visible here. In a real app, add a 'hidden' class by default -->
  <button aria-label="Scroll to top" class="group flex h-14 w-14 items-center justify-center rounded-full shadow-lg transition-all duration-300 ease-in-out hover:scale-110 focus:outline-none focus:ring-4 focus:ring-blue-300 dark:focus:ring-blue-800
    bg-gradient-to-br from-emerald-400 via-teal-500 to-blue-600
    dark:from-emerald-600 dark:via-teal-700 dark:to-blue-800">
    <svg class="h-8 w-8 text-white transition-transform duration-300 ease-in-out 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>
  </button>
</div>

Related Components

Back to Top Button Component

A responsive back to top button designed with microinteractions and vibrant colors, suitable for a dashboard interface with dark mode support.

Open

Glassmorphism Rainbow Back to Top Button for Agriculture

A complex, responsive 'Back to Top' button component with a glassmorphism design and a rainbow gradient, tailored for agriculture/farming websites. Features blur effects and dark mode support.

Open

Art Deco Back to Top Button

A 'Back to Top' button component with an Art Deco design, featuring geometric patterns and warm sunset colors, suitable for dating/social platforms. It includes a rich, interactive style and supports dark mode.

Open