Copied SVG to clipboard
Something went wrong
Copied code to clipboard
Something went wrong

Default

User image

Default

Name

  • Osmo Discount
    -25%
The Vault/

Button with Bubble Arrow

Button with Bubble Arrow

Documentation

Webflow

Code

Setup: External Scripts

External Scripts in Webflow

Make sure to always put the External Scripts before the Javascript step of the resource.

In this video you learn where to put these in your Webflow project? Or how to include a paid GSAP Club plugin in your project?

HTML

Copy

Step 1: Copy structure to Webflow

Copy structure to Webflow

In the video below we described how you can copy + paste the structure of this resource to your Webflow project.

Copy to Webflow

Webflow structure is not required for this resource.

Step 1: Add HTML

HTML

Copy
<div class="btn-group">
  <a href="#" class="btn-bubble-arrow w-inline-block">
    <div class="btn-bubble-arrow__arrow">
      <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" width="100%" class="btn-bubble-arrow__arrow-svg"><polyline points="18 8 18 18 8 18" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="1.5"></polyline><line x1="18" y1="18" x2="5" y2="5" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="1.5"></line></svg>
    </div>
    <div class="btn-bubble-arrow__content">
      <span class="btn-bubble-arrow__content-text">Button Bubble</span>
    </div>
    <div class="btn-bubble-arrow__arrow is--duplicate">
      <svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 24 24" width="100%" class="btn-bubble-arrow__arrow-svg"><polyline points="18 8 18 18 8 18" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="1.5"></polyline><line x1="18" y1="18" x2="5" y2="5" fill="none" stroke="currentColor" stroke-miterlimit="10" stroke-width="1.5"></line></svg>
    </div>
  </a>
</div>

HTML structure is not required for this resource.

Step 2: Add CSS

CSS

Copy
.btn-group {
  grid-column-gap: 3em;
  grid-row-gap: 3em;
  justify-content: center;
  font-size: 2em;
  display: flex;
}

.btn-bubble-arrow {
  border-radius: 10em;
  justify-content: center;
  align-items: center;
  font-size: 1em;
  text-decoration: none;
  display: flex;
  position: relative;
}

.btn-bubble-arrow__arrow {
  color: #131313;
  background-color: #ff4c2f;
  border-radius: 10em;
  flex-flow: row;
  justify-content: center;
  align-items: center;
  width: 3.75em;
  height: 3.75em;
  display: flex;
  position: relative;
  transition: transform 0.735s cubic-bezier(0.625, 0.05, 0, 1);
  transform: scale(0) rotate(0.001deg);
  transform-origin: left;
}

.btn-bubble-arrow__arrow.is--duplicate {
  z-index: 2;
  background-color: #efeeec;
  position: absolute;
  right: 0;
}

.btn-bubble-arrow__arrow-svg {
  width: 40%;
  transition: transform 0.735s cubic-bezier(0.625, 0.05, 0, 1);
  transform: rotate(0.001deg);
}

.btn-bubble-arrow__arrow.is--duplicate {
  position: absolute;
  z-index: 2;
  right: 0;
  transform: scale(1) rotate(0.001deg);
  transform-origin: right;
}

.btn-bubble-arrow__content {
  color: #efeeec;
  background-color: #0006;
  border-radius: 10em;
  justify-content: center;
  align-items: center;
  height: 3.75em;
  padding-left: 2em;
  padding-right: 2em;
  display: flex;
  position: relative;
  transition: transform 0.735s cubic-bezier(0.625, 0.05, 0, 1);
  transform: translateX(-3.75em) rotate(0.001deg);
}

.btn-bubble-arrow__content-text {
  line-height: 1;
}

/* Hover */

.btn-bubble-arrow:hover .btn-bubble-arrow__content {
  transform: translateX(0em) rotate(0.001deg);
}

.btn-bubble-arrow:hover .btn-bubble-arrow__arrow-svg {
  transform: rotate(-45deg);
}

.btn-bubble-arrow:hover .btn-bubble-arrow__arrow {
  transform: scale(1) rotate(0.001deg);
}

.btn-bubble-arrow:hover .btn-bubble-arrow__arrow.is--duplicate {
  transform: scale(0) rotate(0.001deg);
}

Step 2: Add custom Javascript

Custom Javascript in Webflow

In this video, Ilja gives you some guidance about using JavaScript in Webflow:

Step 2: Add Javascript

Step 3: Add Javascript

Javascript

Copy

Step 3: Add custom CSS

Step 2: Add custom CSS

Custom CSS in Webflow

Curious about where to put custom CSS in Webflow? Ilja explains it in the below video:

CSS

Copy
.btn-bubble-arrow__content {
  transition: transform 0.735s cubic-bezier(0.625, 0.05, 0, 1);
  transform: translateX(-3.75em) rotate(0.001deg);
}

.btn-bubble-arrow__arrow {
  transition: transform 0.735s cubic-bezier(0.625, 0.05, 0, 1);
  transform: scale(0) rotate(0.001deg);
  transform-origin: left;
}

.btn-bubble-arrow__arrow-svg {
  transition: transform 0.735s cubic-bezier(0.625, 0.05, 0, 1);
  transform: rotate(0.001deg);
}

.btn-bubble-arrow__arrow.is--duplicate {
  position: absolute;
  z-index: 2;
  right: 0;
  transform: scale(1) rotate(0.001deg);
  transform-origin: right;
}

/* Hover */

.btn-bubble-arrow:hover .btn-bubble-arrow__content {
  transform: translateX(0em) rotate(0.001deg);
}

.btn-bubble-arrow:hover .btn-bubble-arrow__arrow-svg {
  transform: rotate(-45deg);
}

.btn-bubble-arrow:hover .btn-bubble-arrow__arrow {
  transform: scale(1) rotate(0.001deg);
}

.btn-bubble-arrow:hover .btn-bubble-arrow__arrow.is--duplicate {
  transform: scale(0) rotate(0.001deg);
}

Implementation

When the .btn-bubble-content element is removed the animation will still work for the arrow.

Resource Details

Button
CSS
Animation
Hover
Transform
Arrow
Bubble

Original source

Dennis Snellenberg

Creator Credits

We always strive to credit creators as accurately as possible. While similar concepts might appear online, we aim to provide proper and respectful attribution.