# Bewertung mit Farbfeldern (C 022)

Kategorie: Cards  
Tags: product, ecommerce, rating, swatches, light  
Seite: https://designforai.dev/de/snippet/card-022

## Prompt

Erstelle eine 250px Produkt-Card: weiß, 1px #e5e7eb Rahmen, 16px Radius. Bildplatzhalter 180px mit 135deg Gradient #cbd5e1 zu #475569. Body: eine 12px Sternebewertung "★★★★☆" in #f59e0b mit Anzahl der Bewertungen in #9ca3af, ein 15px Produktname, drei 16px runde Farbfelder (#1e293b, #f97316, #22c55e), umringt von einem 1px #d1d5db Schatten, der beim Hover zu einem 2px schwarzen Ring wird, dann eine Zeile mit 17px fettem Preis und einem schwarzen Pillen-Button "Add".

## HTML

```html
<article class="card-022">
  <div class="card-022__img"></div>
  <div class="card-022__body">
    <div class="card-022__rating">★★★★☆ <span>(212)</span></div>
    <h3>Trail runner 2</h3>
    <div class="card-022__swatches"><i style="background:#1e293b"></i><i style="background:#f97316"></i><i style="background:#22c55e"></i></div>
    <div class="card-022__row"><strong>$139</strong><button>Add</button></div>
  </div>
</article>
```

## CSS

```css
.card-022 {
  width: 250px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  overflow: hidden;
  font-family: system-ui,sans-serif;
  color: #111827
}
.card-022__img {
  height: 180px;
  background: linear-gradient(135deg,#cbd5e1,#475569)
}
.card-022__body {
  padding: 14px 16px 16px
}
.card-022__rating {
  font-size: 12px;
  color: #f59e0b
}
.card-022__rating span {
  color: #9ca3af
}
.card-022 h3 {
  margin: 4px 0 8px;
  font-size: 15px
}
.card-022__swatches {
  display: flex;
  gap: 6px;
  margin-bottom: 12px
}
.card-022__swatches i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #d1d5db;
  cursor: pointer
}
.card-022__swatches i:hover {
  box-shadow: 0 0 0 2px #111827
}
.card-022__row {
  display: flex;
  justify-content: space-between;
  align-items: center
}
.card-022 strong {
  font-size: 17px
}
.card-022 button {
  padding: 7px 16px;
  border: 0;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer
}
.card-022 button:hover {
  background: #374151
}
.card-022 :is(a,button,input,select,textarea):focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
```
