# Product Quick Actions Card

> A product tile whose Quick view and Add to cart buttons slide up on hover or keyboard focus.

- Category: [CSS Cards](https://copy-css.com/category/cards)
- Tags: product, hover actions, quick view, add to cart, shop, focus-within
- Live preview: https://copy-css.com/snippets/product-quick-actions-card
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<article class="quick-card">
  <div class="quick-card-media">
    <img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 30'%3E%3Crect width='40' height='30' fill='%23fef3c7'/%3E%3Crect x='13' y='9' width='12' height='14' rx='2' fill='%23d97706'/%3E%3Cpath d='M25 12h2a3 3 0 0 1 0 6h-2' fill='none' stroke='%23b45309' stroke-width='2'/%3E%3C/svg%3E" alt="Amber stoneware mug" width="200" height="150">
    <div class="quick-card-actions">
      <button type="button">Quick view</button>
      <button type="button">Add to cart</button>
    </div>
  </div>
  <h3><a href="#">Stoneware Mug</a></h3>
  <p>$24</p>
</article>
```

## CSS

```css
.quick-card {
  width: 200px;
  color: #292524;
  font-family: system-ui, sans-serif;
}

.quick-card-media {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
}

.quick-card-media img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.4s ease;
}

.quick-card-actions {
  position: absolute;
  right: 8px;
  bottom: 8px;
  left: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.quick-card-actions button {
  padding: 8px 4px;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: #292524;
  font: 600 12px system-ui, sans-serif;
  cursor: pointer;
}

.quick-card-actions button:last-child {
  background: #292524;
  color: #fff;
}

.quick-card:hover .quick-card-actions,
.quick-card:focus-within .quick-card-actions {
  opacity: 1;
  transform: none;
}

.quick-card:hover img {
  transform: scale(1.05);
}

.quick-card button:focus-visible,
.quick-card a:focus-visible {
  outline: 2px solid #d97706;
  outline-offset: 2px;
}

.quick-card h3 {
  margin: 10px 0 0;
  font-size: 14px;
  font-weight: 600;
}

.quick-card h3 a {
  color: inherit;
  text-decoration: none;
}

.quick-card p {
  margin: 2px 0 0;
  color: #78716c;
  font-size: 14px;
}

@media (hover: none) {
  .quick-card-actions {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .quick-card-media img,
  .quick-card-actions {
    transition: none;
  }
}
```

## Notes

- This CSS Product Quick Actions Card is 93 lines of pure CSS (1.5 KB) with no JavaScript and no dependencies. It uses transitions, transforms, CSS Grid and keyboard focus styles.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
