Animated Product Card
Modern product card with hover effects, quick view, and add to cart functionality, perfect for e-commerce listings.
Responsive Design
Yes
Dark Mode Support
No
lines
565
Browser Compatibility
Chrome Β· Firefox Β· Safari Β· Edge
Live Preview
Interact with the component without leaving the page.
Overview
Modern product card with hover effects, quick view, and add to cart functionality, perfect for e-commerce listings.
How to use
- Copy the HTML markup into your page.
- Paste the CSS into your stylesheet and ensure the selectors match your markup.
- Paste the JavaScript and load it after the markup.
- Adjust spacing, colors, and text to match your design system.
Customization tips
- Rename class names to avoid collisions with your existing CSS.
- Replace hard-coded colors with CSS variables for theming.
- Verify the layout at 320px, 768px, and 1024px widths.
HTML
47
lines
CSS
363
lines
JavaScript
155
lines
<div class="product-card-container">
<div class="product-card-demo">
<div class="product-card">
<div class="product-image">
<img src="https://images.unsplash.com/photo-1546868871-7041f2a55e12?w=400&h=400&fit=crop" alt="Wireless Headphones">
<div class="product-badge">Sale</div>
<div class="product-actions">
<button class="action-btn wishlist" title="Add to Wishlist">β‘</button>
<button class="action-btn quick-view" title="Quick View">ποΈ</button>
<button class="action-btn compare" title="Compare">β</button>
</div>
</div>
<div class="product-info">
<div class="product-category">Electronics</div>
<h3 class="product-title">Premium Wireless Headphones</h3>
<div class="product-rating">
<span class="stars">β
β
β
β
β
</span>
<span class="rating-count">(128)</span>
</div>
<div class="product-price">
<span class="current-price">\$89.99</span>
<span class="original-price">\$129.99</span>
</div>
<div class="product-description">
High-quality wireless headphones with noise cancellation and 30-hour battery life.
</div>
<div class="product-variants">
<div class="color-options">
<span class="color-option active" style="background: #333;" title="Black"></span>
<span class="color-option" style="background: #fff; border: 1px solid #ddd;" title="White"></span>
<span class="color-option" style="background: #667eea;" title="Blue"></span>
</div>
</div>
<div class="product-actions-bottom">
<button class="btn btn-secondary add-to-cart">
<span class="btn-text">Add to Cart</span>
<span class="btn-icon">π</span>
</button>
<button class="btn btn-primary buy-now">
<span class="btn-text">Buy Now</span>
</button>
</div>
</div>
</div>
</div>
</div>
Browser Compatibility
Chrome
>= 50
Firefox
>= 45
Safari
>= 10
Edge
>= 15