Skip to content
Added 2 Sept 2026
Back to library
sliding-tooltip-rail-15697
Sliding Tooltip Rail
Tooltips & Popovers

Sliding Tooltip Rail

Formatting toolbar served by a single tooltip pill that glides sideways to sit over whichever button the pointer reaches, swapping its label as it travels.

Tooltips & Popoverstooltiptoolbarsharedsliderail
lines of CSS
65lines of CSS
dependencies
0dependencies
browser, for years
Everybrowser, for years
motion only on interaction
Hovermotion only on interaction
Backdrop
BIUSBoldItalicUnderlineStrikeLink
Open a live copy in

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

sliding-tooltip-rail-15697.css
.fx-v14-tt-rail-15696 {
  position: relative;
  display: flex;
  gap: 4px;
  padding: 5px;
  background: #151d31;
  border: 1px solid #29344d;
  border-radius: 0.6rem;
  box-shadow: 0 10px 24px rgba(0,0,0,0.45);
}
.fx-v14-tt-rail-15696 .k {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #94a3b8;
  border-radius: 0.4rem;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}
.fx-v14-tt-rail-15696 .k i { font-style: italic; font-family: Georgia, serif; }
.fx-v14-tt-rail-15696 .k:nth-child(3) { text-decoration: underline; }
.fx-v14-tt-rail-15696 .k:nth-child(4) { text-decoration: line-through; }
.fx-v14-tt-rail-15696 .k:hover { background: #243149; color: #e2e8f0; }
.fx-v14-tt-rail-15696 em {
  position: absolute;
  bottom: calc(100% + 9px);
  left: 20px;
  display: grid;
  padding: 0.2rem 0.45rem;
  font-style: normal;
  font-size: 0.64rem;
  font-weight: 600;
  white-space: nowrap;
  color: #0f172a;
  background: #e2e8f0;
  border-radius: 0.3rem;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%);
  transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.16s ease;
}
.fx-v14-tt-rail-15696 em i { grid-area: 1 / 1; font-style: normal; text-align: center; opacity: 0; transition: opacity 0.14s ease; }
.fx-v14-tt-rail-15696 em::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -4px;
  border: 4px solid transparent;
  border-top-color: #e2e8f0;
}
.fx-v14-tt-rail-15696 .k:hover ~ em { opacity: 1; }
.fx-v14-tt-rail-15696 .k:nth-child(1):hover ~ em { left: 20px; }
.fx-v14-tt-rail-15696 .k:nth-child(2):hover ~ em { left: 54px; }
.fx-v14-tt-rail-15696 .k:nth-child(3):hover ~ em { left: 88px; }
.fx-v14-tt-rail-15696 .k:nth-child(4):hover ~ em { left: 122px; }
.fx-v14-tt-rail-15696 .k:nth-child(5):hover ~ em { left: 156px; }
.fx-v14-tt-rail-15696 .k:nth-child(1):hover ~ em i:nth-child(1) { opacity: 1; }
.fx-v14-tt-rail-15696 .k:nth-child(2):hover ~ em i:nth-child(2) { opacity: 1; }
.fx-v14-tt-rail-15696 .k:nth-child(3):hover ~ em i:nth-child(3) { opacity: 1; }
.fx-v14-tt-rail-15696 .k:nth-child(4):hover ~ em i:nth-child(4) { opacity: 1; }
.fx-v14-tt-rail-15696 .k:nth-child(5):hover ~ em i:nth-child(5) { opacity: 1; }
sliding-tooltip-rail-15697.html
<div class="fx-v14-tt-rail-15696">
  <b class="k">B</b>
  <b class="k">
    <i>I</i>
  </b>
  <b class="k">U</b>
  <b class="k">S</b>
  <b class="k">
    <svg viewBox="0 0 24 24" width="14" height="14" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
      <path d="M10 13a5 5 0 007.5.5l3-3a5 5 0 00-7-7l-1.7 1.7"></path>
      <path d="M14 11a5 5 0 00-7.5-.5l-3 3a5 5 0 007 7l1.7-1.7"></path>
    </svg>
  </b>
  <em>
    <i>Bold</i>
    <i>Italic</i>
    <i>Underline</i>
    <i>Strike</i>
    <i>Link</i>
  </em>
</div>

What do I do with this?

  1. Put sliding-tooltip-rail-15697.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-v14-tt-rail-15696">. 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 sliding-tooltip-rail-15697

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 sliding-tooltip-rail-15697

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 left (and background, color). 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 left 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

28 more effects in Tooltips & Popovers

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 Tooltips & Popovers

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 Sliding Tooltip Rail

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