# Isometric Button

> An isometric block button with skewed side faces that pushes into the page when clicked.

- Category: [CSS Buttons](https://copy-css.com/category/buttons)
- Tags: 3d, extrude, skew, depth, press
- Live preview: https://copy-css.com/snippets/isometric-button
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<button class="btn-iso">Build it</button>
```

## CSS

```css
.btn-iso {
  --depth: 8px;
  position: relative;
  padding: 15px 34px;
  border: 0;
  background: #f59e0b;
  color: #1c1917;
  font: 800 16px/1 system-ui, sans-serif;
  cursor: pointer;
  transition: transform 0.12s ease;
}

/* Bottom face */
.btn-iso::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: var(--depth);
  background: #b45309;
  transform: skewX(45deg);
  transform-origin: top;
  transition: height 0.12s ease;
}

/* Right face */
.btn-iso::after {
  content: "";
  position: absolute;
  top: 0;
  left: 100%;
  width: var(--depth);
  height: 100%;
  background: #d97706;
  transform: skewY(45deg);
  transform-origin: left;
  transition: width 0.12s ease;
}

.btn-iso:active {
  transform: translate(var(--depth), var(--depth));
}

.btn-iso:active::before {
  height: 0;
}

.btn-iso:active::after {
  width: 0;
}

.btn-iso:focus-visible {
  outline: 3px solid #1c1917;
  outline-offset: 14px;
}
```

## Notes

- This CSS Isometric Button is 56 lines of pure CSS (0.9 KB) with no JavaScript and no dependencies. It uses transitions, transforms, keyboard focus styles and custom properties.
- Customize with: `--depth`.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
