# Neumorphic Button

> A soft UI button that sits raised from the surface and smoothly presses in when clicked.

- Category: [CSS Box Shadows](https://copy-css.com/category/shadows)
- Tags: neumorphism, soft ui, pressed, inset, active state
- Live preview: https://copy-css.com/snippets/neumorphic-button
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<button class="neu-btn" type="button">Play</button>
```

## CSS

```css
.neu-btn {
  padding: 16px 36px;
  border: 0;
  border-radius: 16px;
  background: #e0e5ec;
  color: #475569;
  font: 600 16px system-ui, sans-serif;
  cursor: pointer;
  box-shadow:
    6px 6px 12px #a3b1c6,
    -6px -6px 12px #ffffff,
    inset 0 0 0 #a3b1c6,
    inset 0 0 0 #ffffff;
  transition: box-shadow 0.2s ease, color 0.2s ease;
}

.neu-btn:hover {
  color: #4338ca;
}

.neu-btn:active {
  box-shadow:
    0 0 0 #a3b1c6,
    0 0 0 #ffffff,
    inset 4px 4px 8px #a3b1c6,
    inset -4px -4px 8px #ffffff;
}

.neu-btn:focus-visible {
  outline: 2px solid #4338ca;
  outline-offset: 4px;
}
```

## Notes

- This CSS Neumorphic Button is 32 lines of pure CSS (0.6 KB) with no JavaScript and no dependencies. It uses transitions, box shadows and keyboard focus styles.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
