# Colored Hover Shadow

> A card whose neutral shadow turns into a soft glow in its accent color on hover or keyboard focus.

- Category: [CSS Box Shadows](https://copy-css.com/category/shadows)
- Tags: glow, hover, card, brand color, transition
- Live preview: https://copy-css.com/snippets/hover-glow-shadow
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<a class="glow-hover" href="#">
  <strong>Analytics</strong>
  <span>See what is working</span>
</a>
```

## CSS

```css
.glow-hover {
  --accent: #10b981;
  display: grid;
  gap: 4px;
  width: 190px;
  padding: 20px;
  border-radius: 16px;
  background: #ffffff;
  color: #0f172a;
  font: 15px/1.4 system-ui, sans-serif;
  text-decoration: none;
  box-shadow:
    0 0 0 1px #e2e8f0,
    0 4px 12px -4px #0f172a1f;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.glow-hover span {
  color: #64748b;
}

.glow-hover:hover,
.glow-hover:focus-visible {
  transform: translateY(-3px);
  box-shadow:
    0 0 0 1px var(--accent),
    0 14px 34px -8px var(--accent);
}

.glow-hover:focus-visible {
  outline: 2px solid #0f172a;
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .glow-hover { transition: box-shadow 0.3s ease; }

  .glow-hover:hover,
  .glow-hover:focus-visible { transform: none; }
}
```

## Notes

- This CSS Colored Hover Shadow is 40 lines of pure CSS (0.8 KB) with no JavaScript and no dependencies. It uses transitions, transforms, box shadows and CSS Grid.
- Customize with: `--accent`.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
