Weather forecast strip
Weather forecast strip preview
Primitive

Weather forecast strip

@opus-motion-library/weather-forecast-strip

From Opus Motion Library

A week-ahead forecast: a row of cards (a stacked list in 1:1 and 9:16) rises in one after another, each with the day, a live animated weather icon (spinning sun, drifting cloud, falling rain / snow, flashing storm, fog bands), a chance-of-rain figure, counting high and low temperatures and a warm-to-cool range bar; today is highlighted.

Install

node cli/mgl.mjs add weather-forecast-strip --to <your-project>/src

When to use

Good for
Weather apps and bulletins, travel and event planning, outdoor-business "what to expect" reels, smart-home widgets. Pass your own days with a day name, icon (sun, moon, partly, cloud, rain, storm, snow, fog, wind), high and low temperatures and optional chance of rain.

Specs

Length
180f · 6s
Length type
Fixed
FPS
30
Style
nature, ui
License
MIT

Props (15)

  • titlestring= "Week ahead"

    headline (empty = none)

  • subtitlestring= "Seven-day forecast"

    line under the headline (empty = none)

  • daysarray= [{"day":"Today","icon":"sun","hi":24,"lo":15,"precip":0},{"day":"Tue","icon":"partly","hi":23,"lo":14,"precip":10},{"…

    days [{day, icon(sun|moon|partly|cloud|rain|storm|snow|fog|wind), hi, lo, label?, precip?(0-100)}] up to 8

  • unitstring= "°"

    text after temperatures (degree sign, "C", ...)

  • highlightIndexnumber= 0

    index of the highlighted card (-1 = none)

  • showPrecipboolean= true

    show chance of rain when a day has precip

  • backgroundstring= "#0D1B2A"

    page colour, or "transparent"

  • cardstring= "#162B42"

    card colour

  • inkstring= "#EAF2FA"

    text colour (icon clouds are tinted from it)

  • accentstring= "#FFB347"

    warm end of the temperature bar and highlight colour

  • accent2string= "#5CB8FF"

    cool end of the temperature bar, rain and precipitation colour

  • sunColorstring= "#FFC83D"

    sun / moon / lightning colour

  • fontFamilystring= ""

    CSS font family (empty = Space Grotesk)

  • startAtnumber= 6

    frame the first card starts

  • speednumber= 1

    animation speed multiplier

Categories