227

Twinkling Sky

Stars twinkle on their own, a meteor occasionally streaks by, and the sky shifts with the cursor

BackgroundIdle loopHover & clickHeadline & heroBackground decorCanvasCanvas 2D

Hannah's Motion Library
Web motion effects × AI prompts

AI prompt

A night-sky background, darker at the top with a soft glow toward the bottom, full of 200+ stars of different sizes and brightness, each twinkling slowly at its own speed and phase; the brightest few show a tiny cross-shaped sparkle at their peak. Every few seconds a meteor streaks diagonally from top right to bottom left with a fading tail. When the cursor moves, the sky shifts in reverse parallax by different amounts depending on each star's depth. (Canvas 2D: each star stores position, radius, depth, twinkle frequency and phase, brightness = sin(time × frequency + phase); meteors are line segments drawn with createLinearGradient; parallax offset smoothed with lerp)

When you copy it, a note to “match the site’s existing theme colors” is added automatically, so you don’t need to specify colors.

How to use it

  1. Tap “Copy AI prompt”.
  2. Paste it into an AI such as ChatGPT or Claude, and tell it which element on your site to apply it to (for example, the homepage headline or a buy button).
  3. The AI writes code that matches your site’s colors. Paste it into your project, then fine-tune the timing and distances.

More background effects

346 more motion effectsText, buttons, cards, backgrounds, cursors… preview them all and copy AI prompts

Browse all effects →