# Momentum Based Hover (Inertia)

> Hover elements that glide with pointer velocity and inertia — physics-feel UI for images and interactive tiles.

**Definition:** Momentum Based Hover (Inertia) is a hover UI animation from collections.html. It is built with HTML, CSS, JavaScript, and GSAP, ships with a live preview, and is free to copy into personal and commercial projects.

## Facts
- Category: Hover
- Stack: HTML, CSS, JavaScript, and GSAP
- Added: 2026-08-04
- Canonical page: https://html.bosconvertpro.com/collection/momentum-based-hover-inertia
- Full-page preview: https://html.bosconvertpro.com/collection/momentum-based-hover-inertia/full
- Live demo: https://html.bosconvertpro.com/demos/momentum-based-hover-inertia/index.html
- Markdown mirror: https://html.bosconvertpro.com/collection/momentum-based-hover-inertia/index.md
- License: https://html.bosconvertpro.com/terms

## How to use
1. Open https://html.bosconvertpro.com/collection/momentum-based-hover-inertia/full to preview the animation in full screen.
2. Copy index.html, styles.css, and script.js from the code tabs on https://html.bosconvertpro.com/collection/momentum-based-hover-inertia.
3. Paste the files into your project and adjust timing, easing, and content as needed.

## FAQ
### What is Momentum Based Hover (Inertia)?

Momentum Based Hover (Inertia) is a hover UI animation from collections.html. Hover elements that glide with pointer velocity and inertia — physics-feel UI for images and interactive tiles.

### What is Momentum Based Hover (Inertia) built with?

Momentum Based Hover (Inertia) is built with HTML, CSS, JavaScript, and GSAP. The source for every file is shown on the animation page and can be copied straight into your project.

### How do I use Momentum Based Hover (Inertia) in my project?

Open the animation page (https://html.bosconvertpro.com/collection/momentum-based-hover-inertia), preview it live, then copy index.html, styles.css, and script.js from the code tabs. Paste the files into your project and adjust timing, easing, and content as needed. A standalone demo runs at https://html.bosconvertpro.com/demos/momentum-based-hover-inertia/index.html.

### Is Momentum Based Hover (Inertia) free to use?

Yes. The Momentum Based Hover (Inertia) demo code may be used in personal and commercial projects. You may not resell or redistribute the collection itself as a competing template pack. Full terms: https://html.bosconvertpro.com/terms.

## Source — index.html
````html
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Momentum Based Hover (Inertia)</title>
    <link rel="preconnect" href="https://fonts.googleapis.com" />
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
    <link rel="preconnect" href="https://images.unsplash.com" />
    <link
      href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap"
      rel="stylesheet"
    />
    <link rel="stylesheet" href="styles.css" />
  </head>
  <body>
    <section class="team-section" data-momentum-hover>
      <div class="team-section__inner">
        <div class="team-section__grid">
          <div class="team-section__cell">
            <div class="team-card__shell" data-momentum-element>
              <article class="team-card" data-momentum-target>
                <div class="team-card__ratio"></div>
                <img
                  class="team-card__image"
                  src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?auto=format&fit=crop&w=800&q=85"
                  alt="Jess, Co-Founder"
                  loading="eager"
                  draggable="false"
                />
                <div class="team-card__content">
                  <div class="team-card__name-row">
                    <h3 class="team-card__name">Jess</h3>
                    <svg
                      class="team-card__badge-icon"
                      xmlns="http://www.w3.org/2000/svg"
                      width="100%"
                      viewBox="0 0 24 24"
                      fill="none"
                      aria-hidden="true"
                    >
                      <path
                        d="M13.06 3.06005L14.56 4.56005C14.8411 4.84143 15.2224 4.9997 15.62 5.00005H17.5C17.8979 5.00005 18.2794 5.15808 18.5607 5.43939C18.842 5.72069 19 6.10222 19 6.50005V8.38005C19.0004 8.77774 19.1587 9.15901 19.44 9.44005L20.94 10.94C21.0803 11.0786 21.1917 11.2437 21.2677 11.4257C21.3438 11.6076 21.3829 11.8028 21.3829 12C21.3829 12.1972 21.3438 12.3925 21.2677 12.5744C21.1917 12.7564 21.0803 12.9215 20.94 13.06L19.44 14.56C19.1587 14.8411 19.0004 15.2224 19 15.62V17.5C19 17.8979 18.842 18.2794 18.5607 18.5607C18.2794 18.842 17.8979 19 17.5 19H15.62C15.2224 19.0004 14.8411 19.1587 14.56 19.44L13.06 20.94C12.9215 21.0803 12.7564 21.1917 12.5744 21.2677C12.3925 21.3438 12.1972 21.3829 12 21.3829C11.8028 21.3829 11.6076 21.3438 11.4257 21.2677C11.2437 21.1917 11.0786 21.0803 10.94 20.94L9.44005 19.44C9.15901 19.1587 8.77774 19.0004 8.38005 19H6.50005C6.10222 19 5.72069 18.842 5.43939 18.5607C5.15808 18.2794 5.00005 17.8979 5.00005 17.5V15.62C4.9997 15.2224 4.84143 14.8411 4.56005 14.56L3.06005 13.06C2.91976 12.9215 2.80837 12.7564 2.73235 12.5744C2.65633 12.3925 2.61719 12.1972 2.61719 12C2.61719 11.8028 2.65633 11.6076 2.73235 11.4257C2.80837 11.2437 2.91976 11.0786 3.06005 10.94L4.56005 9.44005C4.84143 9.15901 4.9997 8.77774 5.00005 8.38005V6.50005C5.00005 6.10222 5.15808 5.72069 5.43939 5.43939C5.72069 5.15808 6.10222 5.00005 6.50005 5.00005H8.38005C8.77774 4.9997 9.15901 4.84143 9.44005 4.56005L10.94 3.06005C11.0786 2.91976 11.2437 2.80837 11.4257 2.73235C11.6076 2.65633 11.8028 2.61719 12 2.61719C12.1972 2.61719 12.3925 2.65633 12.5744 2.73235C12.7564 2.80837 12.9215 2.91976 13.06 3.06005Z"
                        fill="#D3FF5B"
                      />
                      <path
                        d="M8.5 11.5L11 14L15 10"
                        stroke="black"
                        stroke-width="1.5"
                        stroke-miterlimit="10"
                      />
                    </svg>
                  </div>
                  <p class="team-card__role">Co-Founder</p>
                </div>
              </article>
            </div>
          </div>

          <div class="team-section__cell">
            <div class="team-card__shell" data-momentum-element>
              <article class="team-card" data-momentum-target>
                <div class="team-card__ratio"></div>
                <img
                  class="team-card__image"
                  src="https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?auto=format&fit=crop&w=800&q=85"
                  alt="Edward, Finance"
                  loading="eager"
                  draggable="false"
                />
                <div class="team-card__content">
                  <div class="team-card__name-row">
                    <h3 class="team-card__name">Edward</h3>
                    <svg
                      class="team-card__badge-icon"
                      xmlns="http://www.w3.org/2000/svg"
                      width="100%"
                      viewBox="0 0 24 24"
                      fill="none"
                      aria-hidden="true"
                    >
                      <path
                        d="M13.06 3.06005L14.56 4.56005C14.8411 4.84143 15.2224 4.9997 15.62 5.00005H17.5C17.8979 5.00005 18.2794 5.15808 18.5607 5.43939C18.842 5.72069 19 6.10222 19 6.50005V8.38005C19.0004 8.77774 19.1587 9.15901 19.44 9.44005L20.94 10.94C21.0803 11.0786 21.1917 11.2437 21.2677 11.4257C21.3438 11.6076 21.3829 11.8028 21.3829 12C21.3829 12.1972 21.3438 12.3925 21.2677 12.5744C21.1917 12.7564 21.0803 12.9215 20.94 13.06L19.44 14.56C19.1587 14.8411 19.0004 15.2224 19 15.62V17.5C19 17.8979 18.842 18.2794 18.5607 18.5607C18.2794 18.842 17.8979 19 17.5 19H15.62C15.2224 19.0004 14.8411 19.1587 14.56 19.44L13.06 20.94C12.9215 21.0803 12.7564 21.1917 12.5744 21.2677C12.3925 21.3438 12.1972 21.3829 12 21.3829C11.8028 21.3829 11.6076 21.3438 11.4257 21.2677C11.2437 21.1917 11.0786 21.0803 10.94 20.94L9.44005 19.44C9.15901 19.1587 8.77774 19.0004 8.38005 19H6.50005C6.10222 19 5.72069 18.842 5.43939 18.5607C5.15808 18.2794 5.00005 17.8979 5.00005 17.5V15.62C4.9997 15.2224 4.84143 14.8411 4.56005 14.56L3.06005 13.06C2.91976 12.9215 2.80837 12.7564 2.73235 12.5744C2.65633 12.3925 2.61719 12.1972 2.61719 12C2.61719 11.8028 2.65633 11.6076 2.73235 11.4257C2.80837 11.2437 2.91976 11.0786 3.06005 10.94L4.56005 9.44005C4.84143 9.15901 4.9997 8.77774 5.00005 8.38005V6.50005C5.00005 6.10222 5.15808 5.72069 5.43939 5.43939C5.72069 5.15808 6.10222 5.00005 6.50005 5.00005H8.38005C8.77774 4.9997 9.15901 4.84143 9.44005 4.56005L10.94 3.06005C11.0786 2.91976 11.2437 2.80837 11.4257 2.73235C11.6076 2.65633 11.8028 2.61719 12 2.61719C12.1972 2.61719 12.3925 2.65633 12.5744 2.73235C12.7564 2.80837 12.9215 2.91976 13.06 3.06005Z"
                        fill="#D3FF5B"
                      />
                      <path
                        d="M8.5 11.5L11 14L15 10"
                        stroke="black"
                        stroke-width="1.5"
                        stroke-miterlimit="10"
                      />
                    </svg>
                  </div>
                  <p class="team-card__role">Finance</p>
                </div>
              </article>
            </div>
          </div>

          <div class="team-section__cell">
            <div class="team-card__shell" data-momentum-element>
              <article class="team-card" data-momentum-target>
                <div class="team-card__ratio"></div>
                <img
                  class="team-card__image"
                  src="https://images.unsplash.com/photo-1438761681033-6461ffad8d80?auto=format&fit=crop&w=800&q=85"
                  alt="Mel, Product Designer"
                  loading="eager"
                  draggable="false"
                />
                <div class="team-card__content">
                  <div class="team-card__name-row">
                    <h3 class="team-card__name">Mel</h3>
                    <svg
                      class="team-card__badge-icon"
                      xmlns="http://www.w3.org/2000/svg"
                      width="100%"
                      viewBox="0 0 24 24"
                      fill="none"
                      aria-hidden="true"
                    >
                      <path
                        d="M13.06 3.06005L14.56 4.56005C14.8411 4.84143 15.2224 4.9997 15.62 5.00005H17.5C17.8979 5.00005 18.2794 5.15808 18.5607 5.43939C18.842 5.72069 19 6.10222 19 6.50005V8.38005C19.0004 8.77774 19.1587 9.15901 19.44 9.44005L20.94 10.94C21.0803 11.0786 21.1917 11.2437 21.2677 11.4257C21.3438 11.6076 21.3829 11.8028 21.3829 12C21.3829 12.1972 21.3438 12.3925 21.2677 12.5744C21.1917 12.7564 21.0803 12.9215 20.94 13.06L19.44 14.56C19.1587 14.8411 19.0004 15.2224 19 15.62V17.5C19 17.8979 18.842 18.2794 18.5607 18.5607C18.2794 18.842 17.8979 19 17.5 19H15.62C15.2224 19.0004 14.8411 19.1587 14.56 19.44L13.06 20.94C12.9215 21.0803 12.7564 21.1917 12.5744 21.2677C12.3925 21.3438 12.1972 21.3829 12 21.3829C11.8028 21.3829 11.6076 21.3438 11.4257 21.2677C11.2437 21.1917 11.0786 21.0803 10.94 20.94L9.44005 19.44C9.15901 19.1587 8.77774 19.0004 8.38005 19H6.50005C6.10222 19 5.72069 18.842 5.43939 18.5607C5.15808 18.2794 5.00005 17.8979 5.00005 17.5V15.62C4.9997 15.2224 4.84143 14.8411 4.56005 14.56L3.06005 13.06C2.91976 12.9215 2.80837 12.7564 2.73235 12.5744C2.65633 12.3925 2.61719 12.1972 2.61719 12C2.61719 11.8028 2.65633 11.6076 2.73235 11.4257C2.80837 11.2437 2.91976 11.0786 3.06005 10.94L4.56005 9.44005C4.84143 9.15901 4.9997 8.77774 5.00005 8.38005V6.50005C5.00005 6.10222 5.15808 5.72069 5.43939 5.43939C5.72069 5.15808 6.10222 5.00005 6.50005 5.00005H8.38005C8.77774 4.9997 9.15901 4.84143 9.44005 4.56005L10.94 3.06005C11.0786 2.91976 11.2437 2.80837 11.4257 2.73235C11.6076 2.65633 11.8028 2.61719 12 2.61719C12.1972 2.61719 12.3925 2.65633 12.5744 2.73235C12.7564 2.80837 12.9215 2.91976 13.06 3.06005Z"
                        fill="#D3FF5B"
                      />
                      <path
                        d="M8.5 11.5L11 14L15 10"
                        stroke="black"
                        stroke-width="1.5"
                        stroke-miterlimit="10"
                      />
                    </svg>
                  </div>
                  <p class="team-card__role">Product Designer</p>
                </div>
              </article>
            </div>
          </div>

          <div class="team-section__cell">
            <div class="team-card__shell" data-momentum-element>
              <article class="team-card" data-momentum-target>
                <div class="team-card__ratio"></div>
                <img
                  class="team-card__image"
                  src="https://images.unsplash.com/photo-1500648767791-00dcc994a43e?auto=format&fit=crop&w=800&q=85"
                  alt="Steve, Marketing & Support"
                  loading="eager"
                  draggable="false"
                />
                <div class="team-card__content">
                  <div class="team-card__name-row">
                    <h3 class="team-card__name">Steve</h3>
                    <svg
                      class="team-card__badge-icon"
                      xmlns="http://www.w3.org/2000/svg"
                      width="100%"
                      viewBox="0 0 24 24"
                      fill="none"
                      aria-hidden="true"
                    >
                      <path
                        d="M13.06 3.06005L14.56 4.56005C14.8411 4.84143 15.2224 4.9997 15.62 5.00005H17.5C17.8979 5.00005 18.2794 5.15808 18.5607 5.43939C18.842 5.72069 19 6.10222 19 6.50005V8.38005C19.0004 8.77774 19.1587 9.15901 19.44 9.44005L20.94 10.94C21.0803 11.0786 21.1917 11.2437 21.2677 11.4257C21.3438 11.6076 21.3829 11.8028 21.3829 12C21.3829 12.1972 21.3438 12.3925 21.2677 12.5744C21.1917 12.7564 21.0803 12.9215 20.94 13.06L19.44 14.56C19.1587 14.8411 19.0004 15.2224 19 15.62V17.5C19 17.8979 18.842 18.2794 18.5607 18.5607C18.2794 18.842 17.8979 19 17.5 19H15.62C15.2224 19.0004 14.8411 19.1587 14.56 19.44L13.06 20.94C12.9215 21.0803 12.7564 21.1917 12.5744 21.2677C12.3925 21.3438 12.1972 21.3829 12 21.3829C11.8028 21.3829 11.6076 21.3438 11.4257 21.2677C11.2437 21.1917 11.0786 21.0803 10.94 20.94L9.44005 19.44C9.15901 19.1587 8.77774 19.0004 8.38005 19H6.50005C6.10222 19 5.72069 18.842 5.43939 18.5607C5.15808 18.2794 5.00005 17.8979 5.00005 17.5V15.62C4.9997 15.2224 4.84143 14.8411 4.56005 14.56L3.06005 13.06C2.91976 12.9215 2.80837 12.7564 2.73235 12.5744C2.65633 12.3925 2.61719 12.1972 2.61719 12C2.61719 11.8028 2.65633 11.6076 2.73235 11.4257C2.80837 11.2437 2.91976 11.0786 3.06005 10.94L4.56005 9.44005C4.84143 9.15901 4.9997 8.77774 5.00005 8.38005V6.50005C5.00005 6.10222 5.15808 5.72069 5.43939 5.43939C5.72069 5.15808 6.10222 5.00005 6.50005 5.00005H8.38005C8.77774 4.9997 9.15901 4.84143 9.44005 4.56005L10.94 3.06005C11.0786 2.91976 11.2437 2.80837 11.4257 2.73235C11.6076 2.65633 11.8028 2.61719 12 2.61719C12.1972 2.61719 12.3925 2.65633 12.5744 2.73235C12.7564 2.80837 12.9215 2.91976 13.06 3.06005Z"
                        fill="#D3FF5B"
                      />
                      <path
                        d="M8.5 11.5L11 14L15 10"
                        stroke="black"
                        stroke-width="1.5"
                        stroke-miterlimit="10"
                      />
                    </svg>
                  </div>
                  <p class="team-card__role">Marketing &amp; Support</p>
                </div>
              </article>
            </div>
          </div>
        </div>
      </div>
    </section>

    <script src="https://cdn.jsdelivr.net/npm/gsap@3.13.0/dist/gsap.min.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/gsap@3.13.0/dist/InertiaPlugin.min.js"></script>
    <script src="script.js"></script>
  </body>
</html>
````

## Source — styles.css
````css
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100svh;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: linear-gradient(160deg, #f7f4ef 0%, #f0ebe3 45%, #e8e4dc 100%);
  color: #1a1a1a;
  overflow-x: hidden;
}

.team-section {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100svh;
  padding: 7.5em 0;
}

.team-section__inner {
  flex: 1;
  max-width: 80em;
  padding: 0 3em;
}

.team-section__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2em;
  height: 100%;
}

.team-section__cell {
  position: relative;
  width: calc(25% - 1.5em);
}

.team-card__shell {
  position: relative;
  width: 100%;
}

.team-card {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 1.5em;
  color: #fff;
  will-change: transform;
  box-shadow:
    0 4px 24px rgba(40, 30, 20, 0.06),
    0 12px 40px rgba(40, 30, 20, 0.08);
}

.team-card__ratio {
  pointer-events: none;
  padding-top: 150%;
}

.team-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.team-card__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.5em;
  width: 100%;
  height: 100%;
  padding: 2em;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.55) 0%,
    rgba(0, 0, 0, 0.15) 40%,
    transparent 70%
  );
}

.team-card__name-row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 0.25em;
}

.team-card__name {
  margin: 0 0 0.0625em;
  font-size: 1.5em;
  font-weight: 500;
  line-height: 1;
}

.team-card__badge-icon {
  width: 1.5em;
  height: 1.5em;
  flex-shrink: 0;
}

.team-card__role {
  margin: 0;
  opacity: 0.67;
  font-size: 1em;
  font-weight: 400;
  line-height: 1;
}

@media screen and (max-width: 991px) {
  .team-section__cell {
    width: calc(50% - 1em);
  }
}

@media screen and (max-width: 767px) {
  .team-section {
    padding: 4em 0;
  }

  .team-section__inner {
    padding: 0 1.5em;
  }

  .team-section__cell {
    width: 100%;
  }

  .team-card__content {
    padding: 1.5em;
  }
}
````

## Source — script.js
````javascript
gsap.registerPlugin(InertiaPlugin);

function initMomentumBasedHover() {
  if (!window.matchMedia("(hover: hover) and (pointer: fine)").matches) {
    return;
  }

  const xyMultiplier = 30;
  const rotationMultiplier = 20;
  const inertiaResistance = 200;

  const clampXY = gsap.utils.clamp(-1080, 1080);
  const clampRot = gsap.utils.clamp(-60, 60);

  document.querySelectorAll("[data-momentum-hover]").forEach((root) => {
    let prevX = 0;
    let prevY = 0;
    let velX = 0;
    let velY = 0;
    let rafId = null;

    root.addEventListener("mousemove", (e) => {
      if (rafId) return;

      rafId = requestAnimationFrame(() => {
        velX = e.clientX - prevX;
        velY = e.clientY - prevY;
        prevX = e.clientX;
        prevY = e.clientY;
        rafId = null;
      });
    });

    root.querySelectorAll("[data-momentum-element]").forEach((el) => {
      el.addEventListener("mouseenter", (e) => {
        const target = el.querySelector("[data-momentum-target]");
        if (!target) return;

        const { left, top, width, height } = target.getBoundingClientRect();
        const centerX = left + width / 2;
        const centerY = top + height / 2;
        const offsetX = e.clientX - centerX;
        const offsetY = e.clientY - centerY;

        const rawTorque = offsetX * velY - offsetY * velX;
        const leverDist = Math.hypot(offsetX, offsetY) || 1;
        const angularForce = rawTorque / leverDist;

        const velocityX = clampXY(velX * xyMultiplier);
        const velocityY = clampXY(velY * xyMultiplier);
        const rotationVelocity = clampRot(angularForce * rotationMultiplier);

        gsap.to(target, {
          inertia: {
            x: { velocity: velocityX, end: 0 },
            y: { velocity: velocityY, end: 0 },
            rotation: { velocity: rotationVelocity, end: 0 },
            resistance: inertiaResistance,
          },
        });
      });
    });
  });
}

document.addEventListener("DOMContentLoaded", () => {
  initMomentumBasedHover();
});
````
