Forecast
Lisbon
12:00, 22 degrees, Sunny
Markup where the component goes, CSS in your stylesheet, script before </body>. In Vue, Svelte or Angular, call initCardForecast(el) on the mounted element instead.
Paste into Claude, ChatGPT or Cursor after filling in {{USER_STACK}}, {{USER_STYLING}} and {{USER_CONSTRAINTS}}. Neutral keeps the greys you see here; Match my project asks the model to map them onto your own colour tokens.
Install with shadcn
Needs a free account token. Get a token
npx shadcn@latest add @movin/card-forecastAbout this component
A weather card whose whole face is the sky at the chosen hour, seen through a window. Pick or drag along the frosted hour strip and the sky recolours from dawn to night, the sun glides along its path, the clouds take the light of the hour, and at the rainy hour a storm rolls in, rain falls behind the glass and drops bead on it.
Triggers
- Card
- Gradient
- Glow
- Ambient
- State change
- Click
Techniques
- @property
- CSS variables
- CSS transition
- Radial gradient
- Gradient
- Keyframes
- Filter
- Event position
Difficulty
Advanced
Accessibility
Keyboard and screen readers
A section labelled Weather in Lisbon. The hours are a radiogroup of six radio buttons, each named with its time, temperature and condition, with a roving tabindex and arrow keys plus Home and End; a polite live region announces the chosen hour. Sky, clouds, rain and drops are aria-hidden.
Reduced motion
The clouds and rain stand still, the runners are hidden and every change is a cut.
Use it in anything you build, commercial and client work included. Licence