Skip to content
Added 30 Aug 2026
Back to library
slope-chart-15507
Slope Chart
Charts & Data

Slope Chart

Before-and-after slope lines with a dot at each end, showing which series rose and which fell between two periods.

Charts & Dataslopecomparisontwo-pointtrendlines
lines of CSS
39lines of CSS
dependencies
0dependencies
browser, for years
Everybrowser, for years
motion only on interaction
Hovermotion only on interaction
Backdrop
20242025
Open a live copy in

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

slope-chart-15507.css
.fx-v13-ch-slope-15506 {
  width: 214px;
  font-size: 0.63rem;
  color: #64748b;
}
.fx-v13-ch-slope-15506 .p {
  position: relative;
  height: 112px;
  padding: 0 2px;
  border-left: 1px solid #253049;
  border-right: 1px solid #253049;
}
.fx-v13-ch-slope-15506 i {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  border-radius: 2px;
  transform-origin: left center;
  transition: filter 0.25s ease;
}
.fx-v13-ch-slope-15506 i::before,
.fx-v13-ch-slope-15506 i::after {
  content: '';
  position: absolute;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: inherit;
}
.fx-v13-ch-slope-15506 i::before { left: -4px; }
.fx-v13-ch-slope-15506 i::after { right: -4px; }
.fx-v13-ch-slope-15506 .a { top: 76px;  background: #34d399; transform: rotate(-16deg); }
.fx-v13-ch-slope-15506 .b { top: 46px;  background: #38bdf8; transform: rotate(-6deg); }
.fx-v13-ch-slope-15506 .d { top: 22px;  background: #f87171; transform: rotate(11deg); }
.fx-v13-ch-slope-15506 .p:hover i { filter: brightness(0.6); }
.fx-v13-ch-slope-15506 .p i:hover { filter: brightness(1.25); }
.fx-v13-ch-slope-15506 .ax { display: flex; justify-content: space-between; margin-top: 0.35rem; }
slope-chart-15507.html
<div class="fx-v13-ch-slope-15506">
  <div class="p">
    <i class="a"></i>
    <i class="b"></i>
    <i class="d"></i>
  </div>
  <div class="ax">
    <span>2024</span>
    <span>2025</span>
  </div>
</div>

What do I do with this?

  1. Put slope-chart-15507.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-v13-ch-slope-15506">. 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 slope-chart-15507

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 slope-chart-15507

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
Compositor only

Only transform, opacity or filter: the GPU can run it without re-laying-out or repainting the page.

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)
No shift expected

Nothing it animates moves or resizes the box in flow. 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

35 more effects in Charts & Data

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 Charts & Data

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 Slope Chart

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