Generation Guide

How to write effective prompts for the best animation results.

Writing good prompts

Be specific about the motion, shape, and context:

  • Good: “three dots bouncing vertically with stagger delay”
  • Too vague: “dots”
  • Good: “skeleton loader for a card with avatar, title, and two body lines”
  • Good: “minimal, single color shimmer bar”

Categories

Selecting a category helps the AI choose appropriate motion patterns. It is optional but improves results for common patterns like skeletons, spinners, and dots.

Speed and size

Every generated component accepts speed and size props:

  • speed={0.5} makes the animation twice as fast
  • speed={2} makes it half as fast
  • size controls the base dimensions

Validation

Every generated component is validated against a strict set of rules before being returned. If validation fails, Stagger automatically retries once with the error context. Invalid components are never shown to you.