Skip to content
Added 17 Aug 2026
Back to library
floating-mini-player-15171
Floating Mini Player
Modals & Overlays

Floating Mini Player

A picture-in-picture video overlay docked in the corner of a page that swells toward the cursor and advances its progress bar on hover.

Modals & Overlayspipvideofloatingoverlayplayer
lines of CSS
55lines of CSS
dependencies
0dependencies
browser, for years
Everybrowser, for years
motion only on interaction
Hovermotion only on interaction
Backdrop
▶
Open a live copy in

Vue, Svelte, styled-components and Tailwind exports are part of Pro. HTML, CSS and React are free forever.

floating-mini-player-15171.css
.fx-v12-mo-pip-15170 {
  position: relative;
  width: 220px;
  height: 140px;
  border-radius: 0.6rem;
  overflow: hidden;
  background: #0f172a;
  border: 1px solid #1e293b;
}
.fx-v12-mo-pip-15170 .doc { position: absolute; inset: 14px; }
.fx-v12-mo-pip-15170 .doc i {
  display: block;
  height: 8px;
  margin-bottom: 10px;
  border-radius: 4px;
  background: #1e293b;
}
.fx-v12-mo-pip-15170 .doc i:nth-child(1) { width: 60%; }
.fx-v12-mo-pip-15170 .doc i:nth-child(2) { width: 90%; }
.fx-v12-mo-pip-15170 .doc i:nth-child(3) { width: 75%; }
.fx-v12-mo-pip-15170 .doc i:nth-child(4) { width: 50%; }
.fx-v12-mo-pip-15170 .pip {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 92px;
  height: 56px;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, #881337, #f43f5e 60%, #fb7185);
  box-shadow: 0 10px 24px rgba(244,63,94,0.35), 0 0 0 1px rgba(255,255,255,0.08);
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.34, 1.4, 0.64, 1), box-shadow 0.3s ease;
}
.fx-v12-mo-pip-15170 .play {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  font-size: 0.6rem;
  color: #881337;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  transition: transform 0.3s ease;
}
.fx-v12-mo-pip-15170 .pip em {
  position: absolute;
  left: 0; bottom: 0;
  height: 3px;
  width: 40%;
  background: #fff;
  transition: width 0.6s ease;
}
.fx-v12-mo-pip-15170:hover .pip { transform: translate(-6px, -6px) scale(1.15); box-shadow: 0 16px 36px rgba(244,63,94,0.5), 0 0 0 1px rgba(255,255,255,0.15); }
.fx-v12-mo-pip-15170:hover .play { transform: scale(1.2); }
.fx-v12-mo-pip-15170:hover .pip em { width: 70%; }
floating-mini-player-15171.html
<div class="fx-v12-mo-pip-15170">
  <div class="doc">
    <i></i>
    <i></i>
    <i></i>
    <i></i>
  </div>
  <div class="pip">
    <span class="play">▶</span>
    <em></em>
  </div>
</div>

What do I do with this?

  1. Put floating-mini-player-15171.css anywhere your page already loads CSS from — in Next.js that is app/globals.css, or any stylesheet with a <link> in your HTML.
  2. Then put the class on the element you want it on: <button class="fx-v12-mo-pip-15170">. The CSS does nothing until a class name in it matches something on the page.
  • Link the stylesheet, then paste the markup wherever you need it.
npx hoverlab add floating-mini-player-15171

What's included

  • The markup and the stylesheet, in whichever framework you pick
  • No runtime dependencies

Works with

  • React
  • Vue
  • Svelte
  • Tailwind
  • styled-components
  • Plain CSS

npx hoverlab add floating-mini-player-15171

Or over MCP, from your editor's agent — no account needed.

License

Free to read, copy and install, for personal and non-commercial projects. Shipping it in client work or a paid product needs Pro ($79 once). The source lands in your repo and stops being ours — no attribution, nothing to upgrade.

Was this useful?

Motion safety

Static estimate, read from the CSS

Reduced motion
Brief motion, no guard

Animates briefly or on interaction. Only looping motion gets a guard in this catalog; copy the one from the Insights tab if this ships on a critical path.

What it animates
Reflows

Animates width (and box-shadow). The browser re-lays-out the page on every frame; prefer transform if you can.

Flashing (WCAG 2.3.1)
No flashing found

No repeating change in opacity, colour or brightness large enough to count as a flash.

Layout shift (CLS)
May shift layout

Animates width on a box in flow, so content beside or after it can move. A category from the CSS, not a measurement for this effect.

Every row is read from the shipped CSS. Only a figure marked measured came from a browser. Customizing the speed changes the timing, so recheck a customized copy. How it is computed

30 more effects in Modals & Overlays

All of them free to read, copy and install — no account, no locked tiles, no watermarked preview. The whole catalog is open, and so are the API and the CLI.

Browse Modals & Overlays

Shipping one commercially

Copying the code is free. Putting it in client work or a paid product is what Pro is for — the licence, not the access.

  • A commercial licence for everything in the catalog
  • Unlimited bundle exports, in Vue, Svelte and Tailwind
  • One payment — no subscription, nothing to renew
Pro — $79 once

7 variations of Floating Mini Player

Finished looks, each one a position in the customizer above. Copy any of them, or open it and keep moving the sliders.