Optimized for: Gemini / ChatGPT / Claude
Expert Prompt for Floating Elements with Random Scroll Physics
Use this engineered prompt to drastically optimize your workflow and output.
Required Variables
- ✦
[ELEMENT_COUNT] - ✦
[MOVEMENT_RANGE] - ✦
[VARIANCE_FACTOR] - ✦
[ASSET_TYPE]
floating-elements-random-scroll-physics.txt
Create a 'floating debris' or 'background particles' component in React using Framer Motion. Generate [ELEMENT_COUNT] items of [ASSET_TYPE] (e.g., icons, shapes, or images). Each element should have a randomized scroll-linked movement. Use useScroll and useTransform to map the same scroll input to different [MOVEMENT_RANGE] values for each element, multiplied by a unique [VARIANCE_FACTOR]. This creates a non-uniform parallax effect where items move at different speeds and directions (x, y, and rotate). Ensure the elements are positioned absolutely and do not interfere with page pointer events.
Example Output
"The AI will produce a background decoration component where multiple objects float and rotate independently at varying speeds as the user scrolls, adding organic depth."