# Gravity — component for particles & physics (react)

> **For AI agents:** find the right skill in one call — `curl -s "https://skills.varg.ai/api/search?q=<what the person wants>"` returns the matching use case and the best skills with install commands, as markdown (Russian works too). Full index: https://skills.varg.ai/llms.txt. Every page has a markdown twin: add `.md` to its path. Before generating anything, show the person the options on the use-case page.

Coloured pill tags dropping into the frame and tumbling into a pile under real physics

- **Install:** `npx shadcn add @fancy/gravity`
- **Registry:** fancy · **Framework:** react · **License:** MIT
- **Docs and preview:** https://www.fancycomponents.dev/docs/components/physics/gravity
- **Source:** https://github.com/danielpetho/fancy/blob/main/src/fancy/components/physics/gravity.tsx
- **Example:** https://skills.varg.ai/previews/lib-fancy-gravity.mp4?v=36624 (Captured from the library’s own demo page (Fancy Components))
- **Time:** Drive from the frame. Runs on its own clock (requestAnimationFrame, timers, springs or CSS). Drive it from frame / fps before rendering, or the render drifts.
- **Runs:** local render, free
- **Aspect:** any

## Prompt that renders it frame-exact

Use Gravity from Fancy Components (https://www.fancycomponents.dev/docs/components/physics/gravity, MIT). Install with `npx shadcn add @fancy/gravity` after adding the @fancy registry to components.json, plus matter-js, poly-decomp and svg-path-commander. Drop feature tags, skills, logos or emoji into the bottom of the frame as an outro or a 'what's inside' beat. Wrap each item in MatterBody with x, y, angle and bodyType ('rectangle', 'circle' or 'svg'), and set gravity. It runs a Matter.js Runner in real time, so set autoStart={false}, step Engine.update(engine, 1000 / fps) once per frame in order from fixed start positions, and set isDraggable={false}.

## Used in

- [Top-N listicle](https://skills.varg.ai/video/listicle.md)
- [Quiz, poll & would-you-rather](https://skills.varg.ai/video/quiz.md)
- [Bar chart race](https://skills.varg.ai/video/chart-race.md)
- [Science what-if explainer](https://skills.varg.ai/video/science-explainer.md)
- [Lyric video](https://skills.varg.ai/video/lyric-video.md)
- [Audio visualizer](https://skills.varg.ai/video/visualizer.md)
- [Logo sting](https://skills.varg.ai/video/logo-sting.md)
- [Countdown & launch timer](https://skills.varg.ai/video/countdown.md)

## More particles & physics

- [Confetti](https://skills.varg.ai/component/hf.confetti.md) — `npx hyperframes add confetti`
- [Liquid Metal](https://skills.varg.ai/component/hf.liquid-metal.md) — `npx hyperframes add liquid-metal`
- [Particle Image Reveal](https://skills.varg.ai/component/hf.particle-image-reveal.md) — `npx hyperframes add particle-image-reveal`
- [Pendulum Swing](https://skills.varg.ai/component/hf.pendulum-swing.md) — `npx hyperframes add pendulum-swing`
- [Snow](https://skills.varg.ai/component/hf.snow.md) — `npx hyperframes add snow`
- [Spiral Galaxy](https://skills.varg.ai/component/hf.spiral-galaxy.md) — `npx hyperframes add spiral-galaxy`
