# 3D Flip Button

> A button that flips over in 3D on hover to show a second label on its back face.

- Category: [CSS Buttons](https://copy-css.com/category/buttons)
- Tags: rotate, perspective, cube, reveal, hover
- Live preview: https://copy-css.com/snippets/3d-flip-button
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<button class="btn-flip">
  <span class="btn-flip-front">Get started</span>
  <span class="btn-flip-back" aria-hidden="true">Let’s go →</span>
</button>
```

## CSS

```css
.btn-flip {
  position: relative;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: none;
  font: 600 16px/1 system-ui, sans-serif;
  cursor: pointer;
  perspective: 600px;
}

.btn-flip-front,
.btn-flip-back {
  display: grid;
  place-items: center;
  padding: 15px 34px;
  border-radius: 12px;
  color: #fff;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transition: transform 0.5s ease;
}

.btn-flip-front {
  background: #4f46e5;
}

.btn-flip-back {
  position: absolute;
  inset: 0;
  padding: 0;
  background: #0f172a;
  transform: rotateX(-180deg);
}

.btn-flip:hover .btn-flip-front,
.btn-flip:focus-visible .btn-flip-front {
  transform: rotateX(180deg);
}

.btn-flip:hover .btn-flip-back,
.btn-flip:focus-visible .btn-flip-back {
  transform: rotateX(0);
}

.btn-flip:focus-visible {
  outline: 3px solid #4f46e5;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .btn-flip-front,
  .btn-flip-back { transition: none; }
}
```

## Notes

- This CSS 3D Flip Button is 54 lines of pure CSS (1.0 KB) with no JavaScript and no dependencies. It uses transitions, 3D transforms, transforms and CSS Grid.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
