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 minimalist and flat Back to Top Button Component for dashboards, featuring a monochromatic color scheme. It's moderately complex with interactive features, a responsive design, and dark theme support, built purely with HTML and Tailwind CSS.

Open

Skeuomorphic Back to Top Button

A skeuomorphic 'Back to Top' button designed with warm neutrals for business/corporate websites, featuring responsive design and dark mode support. The button has a 3D pressed effect.

Open

Brutalist Back to Top

A brutalist Back to Top button component using grayscale colors and Tailwind CSS. It is responsive and supports dark mode.

Open