Data · comparison-dumbbell
Comparison dumbbell
A dumbbell (before / after) chart: for each category a "before" dot appears on a shared axis, then the "after" dot slides away from it, stretching a connector coloured green for improvement and red for decline, with value labels and a change pill at the right.
A free, MIT-licensed animated chart from the Opus Motion Library — 616 motions for Remotion, React and plain HTML.

What Comparison dumbbell is for
Change between two states per item: before vs after, last year vs this year, plan vs actual, men vs women, A vs B, scores pre- and post-launch. Pass data as [{label, before, after}], set the two series names, colours, prefix / suffix and which direction is good.
Details
- Category
- Animated charts & data visualisation
- Length
- 6.0 s (180 frames at 30 fps)
- Formats
- 16:9, 1:1, 9:16
- Weight
- light
- Transparent overlay
- yes
- Seamless loop
- no
- Text props
titlesubtitleprefix- Colour props
beforeColorafterColorgoodColorbadColorbackgroundink- Mood
- hud
- Roles
- accent, subject
Use Comparison dumbbell in Remotion, React or HTML
Remotion project
# copy this motion into your Remotion project
node cli/mgl.mjs add comparison-dumbbell --to ../my-app/src
# render an mp4 (run in the library folder)
node cli/mgl.mjs render comparison-dumbbell --props '{"title":"Satisfaction by area","subtitle":"Score out of 100, before and after the redesign","prefix":"","beforeColor":"#9AA3AD","afterColor":"#2F6FED","goodColor":"#12A150","badColor":"#E5484D","background":"#F5F3EE","ink":"#18212B"}'
# or export for apps / editors: mp4 | webm-alpha | prores-alpha | gif | png | poster
node cli/mgl.mjs export comparison-dumbbell --as webm-alpha --props '{"title":"Satisfaction by area","subtitle":"Score out of 100, before and after the redesign","prefix":"","beforeColor":"#9AA3AD","afterColor":"#2F6FED","goodColor":"#12A150","badColor":"#E5484D","background":"#F5F3EE","ink":"#18212B"}'React / Next.js
import {MotionPlayer} from 'opus-motion-library/web';
<MotionPlayer
motion="comparison-dumbbell"
props={{
title: 'Satisfaction by area',
subtitle: 'Score out of 100, before and after the redesign',
prefix: '',
beforeColor: '#9AA3AD',
afterColor: '#2F6FED',
goodColor: '#12A150',
badColor: '#E5484D',
background: '#F5F3EE',
ink: '#18212B',
}}
playOnView
loop="auto"
/>Plain HTML / WordPress
<script src="opus-motion.element.js" defer></script>
<opus-motion motion="comparison-dumbbell"
props='{"title":"Satisfaction by area","subtitle":"Score out of 100, before and after the redesign","prefix":"","beforeColor":"#9AA3AD","afterColor":"#2F6FED","goodColor":"#12A150","badColor":"#E5484D","background":"#F5F3EE","ink":"#18212B"}'>
</opus-motion>Compose spec (multi-scene video)
{
"width": 1920,
"height": 1080,
"fps": 30,
"scenes": [
{
"motion": "comparison-dumbbell",
"props": {
"title": "Satisfaction by area",
"subtitle": "Score out of 100, before and after the redesign",
"prefix": "",
"beforeColor": "#9AA3AD",
"afterColor": "#2F6FED",
"goodColor": "#12A150",
"badColor": "#E5484D",
"background": "#F5F3EE",
"ink": "#18212B"
}
}
]
}Comparison dumbbell props
23 parameters — change any of them to make the motion yours.
| Prop | Default | What it does |
|---|---|---|
data | [{"label":"Onboarding","before":42,"after":78},{"label":"Checkout","before":55,"after":… | rows [{label, before, after}]; any count |
title | "Satisfaction by area" | headline (empty = none) |
subtitle | "Score out of 100, before and after the redesign" | small line under the headline (empty = none) |
beforeLabel | "Before" | legend name of the first dot |
afterLabel | "After" | legend name of the second dot |
prefix | "" | text before every number, e.g. "$" |
suffix | "" | text after every number, e.g. "%", " pts" |
decimals | 0 | decimal places on the numbers |
sort | "none" | "none", "delta" (biggest change first), "after" or "before" (largest first) |
showValues | true | print the before and after values beside the dots |
showDelta | true | show the change pill at the right |
deltaMode | "absolute" | "absolute" (after minus before) or "percent" |
goodDirection | "up" | "up" (increase is green) or "down" (decrease is green, e.g. cost, time) |
zeroBased | false | start the axis at zero (otherwise it zooms to the data range) |
beforeColor | "#9AA3AD" | colour of the before dot |
afterColor | "#2F6FED" | colour of the after dot |
goodColor | "#12A150" | connector and pill colour for a good change |
badColor | "#E5484D" | connector and pill colour for a bad change |
background | "#F5F3EE" | page colour, or "transparent" to sit over other content |
ink | "#18212B" | text and grid colour |
fontFamily | "" | CSS font family (empty = Space Grotesk) |
startAt | 10 | frame the first row starts |
speed | 1 | animation speed multiplier |
Related motions

Bubble scatter grow
Three-variable comparisons: markets by size, growth and margin, countries, products, campaigns, startups. Pass points as [{label, x, y,…
bubble-scatter-grow
Bar chart race
Rankings over time: market share by year, top products by quarter, followers by month, league tables, "who is winning" stories. Give the…
bar-race
Donut breakdown
Share-of-total stories on any brand: revenue by channel, budget split, traffic sources, survey answers, market share. Replace data,…
donut-breakdown
Heatmap calendar
Activity over a year: commits, workouts, streaks, sales days, habits, support tickets, website traffic by day. Pass values (one number per…
heatmap-calendar
Radar compare
Comparing two or three things across the same criteria: products, plans, candidates, teams, skill profiles, before / after. Replace axes,…
radar-compare
Sankey flow
Where things go: traffic to conversions, budget to departments, energy or cash flows, funnels with leaks, user journeys. Pass links as…
sankey-flow
Notes & credits
Technique sources:
- original round-3 chart motion