Back to Top Button

A minimalist 'Back to Top' button with responsive effects and dark theme support using Tailwind CSS.

Preview

HTML Code

<div class="fixed bottom-5 right-5 z-50">
  <a href="#" class="flex items-center justify-center w-12 h-12 bg-blue-500 text-white rounded-full shadow-lg hover:bg-blue-600 transition duration-300 ease-in-out dark:bg-gray-700 dark:text-gray-200 dark:hover:bg-gray-600">
    <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor" class="w-6 h-6">
      <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4" />
    </svg>
  </a>
</div>

<style>
  @media (prefers-color-scheme: dark) {
    .bg-blue-500 {
      background-color: #3b82f6;
    }
    .hover\:bg-blue-600:hover {
      background-color: #2563eb;
    }
  }
</style>

Related Components

Back to Top Button Component

A responsive Back to Top button designed in a skeuomorphic style, featuring dark theme support and responsive effects.

Open

Back to Top Button Minimalist Vibrant

A minimal and flat Back to Top button component with vibrant colors, suitable for a portfolio website. It includes responsive design and dark mode support using Tailwind CSS.

Open

Back to Top Button Component

A responsive Back to Top Button Component with Glassmorphism design, Earth tones color scheme, and complex interactions, suitable for a dashboard.

Open