# Clay Button

> A puffy claymorphism button made from inner highlights, inner shade and a soft drop shadow.

- Category: [CSS Buttons](https://copy-css.com/category/buttons)
- Tags: claymorphism, clay, 3d, soft, puffy, inset
- Live preview: https://copy-css.com/snippets/clay-button
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<button class="btn-clay">Let’s play</button>
```

## CSS

```css
.btn-clay {
  padding: 16px 34px;
  border: 0;
  border-radius: 20px;
  background: #a78bfa;
  color: #fff;
  font: 700 16px/1 system-ui, sans-serif;
  text-shadow: 0 1px 1px rgba(76, 29, 149, 0.4);
  box-shadow:
    inset 0 -6px 10px rgba(76, 29, 149, 0.35),
    inset 0 6px 10px rgba(255, 255, 255, 0.45),
    0 12px 24px -8px rgba(124, 58, 237, 0.55);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-clay:hover {
  transform: translateY(-2px);
  box-shadow:
    inset 0 -6px 10px rgba(76, 29, 149, 0.35),
    inset 0 6px 10px rgba(255, 255, 255, 0.45),
    0 16px 30px -8px rgba(124, 58, 237, 0.6);
}

.btn-clay:active {
  transform: translateY(1px) scale(0.98);
  box-shadow:
    inset 0 -3px 8px rgba(76, 29, 149, 0.35),
    inset 0 4px 8px rgba(255, 255, 255, 0.4),
    0 6px 12px -6px rgba(124, 58, 237, 0.5);
}

.btn-clay:focus-visible {
  outline: 2px solid #7c3aed;
  outline-offset: 3px;
}
```

## Notes

- This CSS Clay Button is 36 lines of pure CSS (0.9 KB) with no JavaScript and no dependencies. It uses transitions, transforms, box shadows and text shadows.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
