# Recipe Card

> A food blog recipe card with a round dish image breaking out of the top and time, servings and level.

- Category: [CSS Cards](https://copy-css.com/category/cards)
- Tags: recipe, food, cooking, meta icons, blog, plate
- Live preview: https://copy-css.com/snippets/recipe-card
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<article class="recipe-card">
  <img src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Ccircle cx='20' cy='20' r='19' fill='%23fafaf9'/%3E%3Ccircle cx='20' cy='20' r='13' fill='%23fcd34d'/%3E%3Cpath d='M11 18c4-3 6 3 10 0s6 3 9 0M11 23c4-3 6 3 10 0s6 3 9 0' fill='none' stroke='%23f59e0b' stroke-width='1.5'/%3E%3Ccircle cx='16' cy='15' r='1.5' fill='%2365a30d'/%3E%3Ccircle cx='25' cy='26' r='1.5' fill='%2365a30d'/%3E%3Ccircle cx='23' cy='14' r='1.2' fill='%23dc2626'/%3E%3C/svg%3E" alt="Lemon herb pasta on a white plate" width="96" height="96">
  <h3><a href="#">Lemon Herb Pasta</a></h3>
  <ul class="recipe-card-meta">
    <li><b>25</b> min</li>
    <li><b>2</b> servings</li>
    <li><b>Easy</b> level</li>
  </ul>
</article>
```

## CSS

```css
.recipe-card {
  width: 220px;
  margin-top: 48px;
  padding: 0 16px 16px;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 12px 28px -14px rgba(146, 64, 14, 0.4);
  color: #451a03;
  font-family: system-ui, sans-serif;
  text-align: center;
}

.recipe-card img {
  display: block;
  width: 96px;
  height: 96px;
  margin: -48px auto 0;
  border-radius: 50%;
  box-shadow: 0 10px 20px -6px rgba(0, 0, 0, 0.3);
  transition: transform 0.6s ease;
}

.recipe-card:hover img {
  transform: rotate(40deg);
}

.recipe-card h3 {
  margin: 10px 0 12px;
  font-size: 16px;
}

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

.recipe-card h3 a:focus-visible {
  outline: 2px solid #d97706;
  outline-offset: 2px;
}

.recipe-card-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0;
  padding: 10px 0 0;
  border-top: 1px solid #fef3c7;
  list-style: none;
  color: #92400e;
  font-size: 11px;
}

.recipe-card-meta b {
  display: block;
  color: #451a03;
  font-size: 14px;
}

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

## Notes

- This CSS Recipe Card is 63 lines of pure CSS (1.1 KB) with no JavaScript and no dependencies. It uses transitions, transforms, box shadows and CSS Grid.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
