# Skewed Button

> A sporty slanted button that straightens out and changes color on hover, with upright text.

- Category: [CSS Buttons](https://copy-css.com/category/buttons)
- Tags: parallelogram, slanted, sporty, uppercase, hover
- Live preview: https://copy-css.com/snippets/skewed-button
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<button class="btn-skew">Play now</button>
```

## CSS

```css
.btn-skew {
  position: relative;
  isolation: isolate;
  padding: 15px 36px;
  border: 0;
  background: transparent;
  color: #fff;
  font: 800 15px/1 system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

/* Only the background is skewed, so the text stays upright */
.btn-skew::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #0f172a;
  transform: skewX(-16deg);
  transition: transform 0.25s ease, background-color 0.25s ease;
}

.btn-skew:hover::before {
  background: #2563eb;
  transform: skewX(0);
}

.btn-skew:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 4px;
}
```

## Notes

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