Back to Top Button
A minimalist 'Back to Top' button with responsive effects and dark theme support using Tailwind CSS.
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
Brutalist Back to Top
A brutalist Back to Top button component using grayscale colors and Tailwind CSS. It is responsive and supports dark mode.
Skeuomorphic Back to Top Button
A simple, responsive, and skeumorphic 'Back to Top' button component for forum/community platforms, designed with a forest/green color palette and full dark mode support.
Back to Top Button Component
A responsive 'Back to Top' button component for documentation/wiki sites, inspired by Memphis Design with a purple/violet color scheme. Includes dark mode support and a complex, interactive appearance.