10 Creative and Stylish CSS Button Designs for Engaging User Interfaces

Here are the top 10 button styles in CSS and HTML that you can use in your projects and customize according to your preferences :

1. Basic Button

HTML
<button class="basic-btn">Click me</button>

<style>
  .basic-btn {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
  }
</style>

2. Gradient Button

HTML
<button class="gradient-btn">Click me</button>

<style>
  .gradient-btn {
    padding: 10px 20px;
    background: linear-gradient(to right, #ff416c, #ff4b2b);
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
  }
</style>

3. Rounded Button

HTML
<button class="rounded-btn">Click me</button>

<style>
  .rounded-btn {
    padding: 10px 20px;
    background-color: #3498db;
    color: #fff;
    border: none;
    border-radius: 25px;
    cursor: pointer;
  }
</style>

4. Outline Button

HTML
<button class="outline-btn">Click me</button>

<style>
  .outline-btn {
    padding: 10px 20px;
    background-color: transparent;
    color: #3498db;
    border: 2px solid #3498db;
    border-radius: 4px;
    cursor: pointer;
  }
</style>

5. Icon Button

HTML
<button class="icon-btn"><i class="fas fa-star"></i> Like</button>

<style>
  .icon-btn {
    padding: 10px 20px;
    background-color: #ff9800;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
  }
</style>

Note: To use the icon in this button you have to use cdn of font-awesome or any other icon directory.

6. Hover Effect Button

HTML
<button class="hover-btn">Hover me</button>

<style>
  .hover-btn {
    padding: 10px 20px;
    background-color: #34495e;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }

  .hover-btn:hover {
    background-color: #2c3e50;
  }
</style>

7. Disabled Button

HTML
<button class="disabled-btn" disabled>Click me</button>

<style>
  .disabled-btn {
    padding: 10px 20px;
    background-color: #95a5a6;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: not-allowed;
  }
</style>

8. Glassmorphism Button

HTML
<button type="button" class="glass-button">Click me</button>

<style>
  body {
  background: linear-gradient(to right, #4e54c8, #8f94fb);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  }

  .glass-button {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    margin: 10px;
    padding: 12px 24px;
    transition: background 0.3s ease-in-out;
  }
  
  .glass-button:hover {
    background: rgba(255, 255, 255, 0.2);
  }
</style>

9. Button with Loading Spinner

HTML
<button type="button" class="button" onclick="this.classList.toggle('button-loading')">
    <span class="button__text">Save</span>
</button>

<style>
  .button {
  position: relative;
  padding: 10px 20px;
  background: #3467FC;
  border: none;
  outline: none;
  border-radius: 2px;
  cursor: pointer;
}

.button:active {
  background: #0C49FC;
}

.button__text {
  color: #ffffff;
  transition: all 0.2s;
}

.button--loading .button__text {
  visibility: hidden;
  opacity: 0;
}

.button--loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  border: 4px solid transparent;
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: button-loading-spinner 1s ease infinite;
  }
  
  @keyframes button-loading-spinner {
    from {
      transform: rotate(0turn);
    }
  
    to {
      transform: rotate(1turn);
    }
  }
</style>

10. Neumorphism Button

HTML
<button class="neumorphism-btn">Click me</button>

<style>
  .neumorphism-btn {
    padding: 15px 30px;
    background-color: #ecf0f3;
    color: #2c3e50;
    border: none;
    border-radius: 10px;
    box-shadow: 5px 5px 10px #bdc3c7, -5px -5px 10px #fff;
    cursor: pointer;
  }
</style>

Leave a Reply

Your email address will not be published. Required fields are marked *