Welcome to All Things GHL - Your Go To Resources for Code Snippets

Button Shimmer

Make your button shine on hover

/* -- Magic Shimmer Button CSS -- */
.shimmer-btn {
  position: relative;
  overflow: hidden;
  transition: color 0.4s ease-in-out;
}
.shimmer-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: left 0.6s ease;
}
.shimmer-btn:hover::before {
  left: 100%;
}
.shimmer-btn:hover {
  color: #fff; /* Changes text color on hover */
}

  1. Paste code into Custom CSS.

  2. Apply the shimmer-btn class to any button

Last updated

Was this helpful?