Opus Motion ★ Star on GitHub

Documents · nutrition-facts-label

Nutrition facts label (count-up)

A printed-style nutrition label: heavy rules draw on, then calories, nutrient amounts and daily-value percentages count up from zero in sequence, one row highlighted; wide frames add a macro donut that sweeps in beside it.

A free, MIT-licensed document animation from the Opus Motion Library — 616 motions for Remotion, React and plain HTML.

Nutrition facts label (count-up): three frames of the document animation, start, middle and end
Nutrition facts label (count-up) — start, middle and end of the 8.0-second motion.

What Nutrition facts label (count-up) is for

Food and drink product promos, packaged-goods ads, health / diet explainers, recipe cards, menu nutrition callouts — set the calories, nutrient rows, serving info and colours.

  • nutrition
  • food
  • label
  • calories
  • health
  • diet
  • ingredients
  • packaging
  • count up
  • macros
  • product
  • document

Details

Category
Document, form & report animations
Length
8.0 s (240 frames at 30 fps)
Formats
16:9, 1:1, 9:16
Weight
light
Transparent overlay
yes
Seamless loop
no
Text props
title footnote
Colour props
background paper ink accent
Mood
—
Roles
subject

Use Nutrition facts label (count-up) in Remotion, React or HTML

Remotion project

terminal
# copy this motion into your Remotion project
node cli/mgl.mjs add nutrition-facts-label --to ../my-app/src

# render an mp4 (run in the library folder)
node cli/mgl.mjs render nutrition-facts-label --props '{"title":"Nutrition Facts","footnote":"* The % Daily Value tells you how much a nutrient in a serving contributes to a daily diet.","background":"#E9EFE4","paper":"#FFFFFF","ink":"#111111","accent":"#F2B134"}'

# or export for apps / editors: mp4 | webm-alpha | prores-alpha | gif | png | poster
node cli/mgl.mjs export nutrition-facts-label --as webm-alpha --props '{"title":"Nutrition Facts","footnote":"* The % Daily Value tells you how much a nutrient in a serving contributes to a daily diet.","background":"#E9EFE4","paper":"#FFFFFF","ink":"#111111","accent":"#F2B134"}'

React / Next.js

tsx
import {MotionPlayer} from 'opus-motion-library/web';

<MotionPlayer
  motion="nutrition-facts-label"
  props={{
    title: 'Nutrition Facts',
    footnote: '* The % Daily Value tells you how much a nutrient in a serving contributes to a daily diet.',
    background: '#E9EFE4',
    paper: '#FFFFFF',
    ink: '#111111',
    accent: '#F2B134',
  }}
  playOnView
  loop="auto"
/>

Plain HTML / WordPress

html
<script src="opus-motion.element.js" defer></script>

<opus-motion motion="nutrition-facts-label"
  props='{"title":"Nutrition Facts","footnote":"* The % Daily Value tells you how much a nutrient in a serving contributes to a daily diet.","background":"#E9EFE4","paper":"#FFFFFF","ink":"#111111","accent":"#F2B134"}'>
</opus-motion>

Compose spec (multi-scene video)

json
{
  "width": 1920,
  "height": 1080,
  "fps": 30,
  "scenes": [
    {
      "motion": "nutrition-facts-label",
      "props": {
        "title": "Nutrition Facts",
        "footnote": "* The % Daily Value tells you how much a nutrient in a serving contributes to a daily diet.",
        "background": "#E9EFE4",
        "paper": "#FFFFFF",
        "ink": "#111111",
        "accent": "#F2B134"
      }
    }
  ]
}

Nutrition facts label (count-up) props

19 parameters — change any of them to make the motion yours.

PropDefaultWhat it does
title"Nutrition Facts"label heading
servings"8 servings per container"servings-per-container line
servingLabel"Serving size"left text of the serving-size line
servingSize"2/3 cup (55 g)"right text of the serving-size line
caloriesLabel"Calories"word next to the big calorie number
calories230calories (counts up from 0)
amountLabel"Amount per serving"small line above the calories
dailyLabel"% Daily Value*"column header over the percentages
nutrients[{"label":"Total Fat","value":8,"unit":"g","daily":10},{"label":"Saturated Fat","value"…rows, up to 14: {label, value, unit, daily? (%), indent?, bold?} — value and daily count up
footnote"* The % Daily Value tells you how much a nutrient in a serving contributes to a daily …small print under the label
highlight"Total Sugars"label of a row to highlight (case-insensitive; empty for none)
macros[{"label":"Carbs","value":37,"color":"#F2B134"},{"label":"Fat","value":8,"color":"#E457…donut segments in wide frames: {label, value, color} — shares are value / sum
panelTitle"Where the energy comes from"caption above the macro legend
countFrames22frames each number takes to count up
background"#E9EFE4"page colour or 'transparent'
paper"#FFFFFF"label colour
ink"#111111"text and rule colour
accent"#F2B134"highlighted row colour
startAt0frame the scene starts

Notes & credits

Technique sources:

  • original (round 3)