CSS Button Generator

Craft call-to-action buttons without trial and error. Control colors, padding, typography, border, radius and hover behaviour, and test the hover state live.

Last updated: · Runs 100% in your browser

// controls
Presets
16px
12px
24px
8px
0px
Live preview
Generated CSS
.button {
  background: linear-gradient(135deg, #00ff66, #00cc44);
  color: #000000;
  font-size: 16px;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 8px;
  border: none;
  box-shadow: 0 8px 24px rgba(0, 255, 102, 0.25);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:focus-visible {
  outline: 2px solid #00ff66;
  outline-offset: 3px;
}

// Example output

.button {
  background: linear-gradient(135deg, #00ff66, #00cc44);
  color: #000000;
  font-size: 16px;
  font-weight: 700;
  padding: 12px 24px;
  border-radius: 8px;
  border: none;
  box-shadow: 0 8px 24px rgba(0, 255, 102, 0.25);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button:focus-visible {
  outline: 2px solid #00ff66;
  outline-offset: 3px;
}

// Features

  • ▸Solid or gradient backgrounds
  • ▸Padding, font size and weight
  • ▸Border and radius controls
  • ▸Lift, glow and darken hover effects
  • ▸Includes :hover and :focus-visible styles

// How to use

  1. 01Adjust the controls on the left or pick a preset to start the CSS Button Generator.
  2. 02Watch the live preview update instantly as you change each setting.
  3. 03Fine-tune the generated CSS by hand in the code panel if you like.
  4. 04Click Copy CSS or Download CSS, or Share to send a link to your design.

// FAQ

Your data never leaves your browser. This tool runs 100% locally — no upload, no logging, no analytics on your inputs.

// Related tools