# Animated Background — component for app & ui mockups (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.

A rounded highlight pill slides between tab items as the active tab changes

- **Install:** `npx motion-primitives@latest add animated-background`
- **Registry:** motion-primitives · **Framework:** react · **License:** MIT
- **Docs and preview:** https://motion-primitives.com/docs/animated-background
- **Source:** https://github.com/ibelick/motion-primitives/blob/main/components/core/animated-background.tsx
- **Example:** https://skills.varg.ai/previews/lib-motion-primitives-animated-background.mp4?v=14754 (Captured from the library’s own demo page (Motion Primitives))
- **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

Show a navigation or tab switch in a UI walkthrough with Motion Primitives' Animated Background (https://motion-primitives.com/docs/animated-background, MIT): a highlight pill glides between items in a tab bar placed where the app shows it. Install with `npx motion-primitives@latest add animated-background`. The pill moves with a shared layoutId layout animation that measures the DOM at runtime, so for a render measure each tab's x and width once and interpolate the pill's position and width from frame / fps (Remotion), or tween it on the paused HyperFrames timeline. Set defaultValue, the transition (spring bounce and duration) and className for the pill color; keep enableHover off.

## Used in

- [Product launch film](https://skills.varg.ai/video/product-launch.md)
- [Feature announcement](https://skills.varg.ai/video/feature-announcement.md)
- [App promo & App Store preview](https://skills.varg.ai/video/app-promo.md)
- [Notes-app ad](https://skills.varg.ai/video/notes-ad.md)
- [Changelog & release notes](https://skills.varg.ai/video/changelog.md)
- [Pull request to video](https://skills.varg.ai/video/pr-video.md)
- [Code walkthrough](https://skills.varg.ai/video/code-walkthrough.md)
- [Website to video](https://skills.varg.ai/video/website-to-video.md)

## More app & ui mockups

- [Apple Notes Video](https://skills.varg.ai/component/varg.apple-notes-video.md) — `git clone https://github.com/vargHQ/code2video-templates && cd code2video-templates/apple-notes-video && bun install`
- [Avatar Group Hover](https://skills.varg.ai/component/hf.avatar-group-hover.md) — `npx hyperframes add avatar-group-hover`
- [Camera Scan Gate](https://skills.varg.ai/component/hf.camera-scan-gate.md) — `npx hyperframes add camera-scan-gate`
- [Card Resize](https://skills.varg.ai/component/hf.card-resize.md) — `npx hyperframes add card-resize`
- [Dynamic Grid](https://skills.varg.ai/component/hf.dynamic-grid.md) — `npx hyperframes add dynamic-grid`
- [Focus Swap](https://skills.varg.ai/component/hf.focus-swap.md) — `npx hyperframes add focus-swap`
