Add to Cart Button Component
A 3D styled 'Add to Cart' button component designed for social media interfaces. It features a rich interface with depth, engaging design elements, and is responsive with dark theme support.
HTML Code
<div class="flex items-center justify-center p-4">
<div class="relative group">
<button class="relative z-10 block rounded-lg bg-blue-500 p-4 text-white text-lg font-semibold shadow-md transition-transform transform-gpu hover:scale-105 focus:outline-none dark:bg-blue-700">
<span>Add to Cart</span>
<span class="absolute top-0 left-0 w-full h-full bg-yellow-400 rounded-lg opacity-0 group-hover:opacity-40 transition-opacity duration-300"></span>
</button>
<div class="absolute -bottom-3 -right-3 w-12 h-12 rounded-full bg-red-500 shadow-lg flex items-center justify-center transform rotate-45 transition-transform duration-300 group-hover:scale-110">
<img src="https://picsum.photos/40" alt="Product Image" class="rounded-full">
</div>
<div class="absolute -bottom-16 -left-16 w-10 h-10 rounded-full bg-green-500 shadow-lg">
<img src="https://picsum.photos/30" alt="Decorative Element" class="rounded-full">
</div>
</div>
</div>
<style>
@media (prefers-color-scheme: dark) {
.bg-blue-500 { background-color: #3b82f6; }
.bg-blue-700 { background-color: #1d4ed8; }
.bg-yellow-400 { background-color: #f59e0b; }
.bg-red-500 { background-color: #ef4444; }
.bg-green-500 { background-color: #22c55e; }
.text-white { color: #ffffff; }
}
</style>
Related Components
Add to Cart Button
Responsive "Add to Cart" button with Skeuomorphic design, Monochromatic color scheme, and dark theme support.
Industrial_AddToCartButton
An industrial-style 'Add to Cart' button component designed with ocean/blue tones for government/public service websites. Features exposed elements, utilitarian aesthetics, full responsiveness, and dark mode support.
Add to Cart Button Component
A nature-inspired, pastel-colored 'Add to Cart' button component designed for healthcare/medical applications, featuring flowing lines and responsive design with dark mode support.