Border Trail — primitive for entrances & emphasis (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.mdto its path. Before generating anything, show the person the options on the use-case page.
A short bright segment races around the border of a dark card in an endless loop
- Install:
npx motion-primitives@latest add border-trail - Registry: motion-primitives · Framework: react · License: MIT
- Docs and preview: https://motion-primitives.com/docs/border-trail
- Source: https://github.com/ibelick/motion-primitives/blob/main/components/core/border-trail.tsx
- Example: https://skills.varg.ai/previews/lib-motion-primitives-border-trail.mp4?v=9459 (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
Run Motion Primitives' Border Trail (https://motion-primitives.com/docs/border-trail, MIT) around a card, input or screenshot frame to show something is loading or to draw the eye. Install with npx motion-primitives@latest add border-trail. The light moves along the border with CSS offset-path while Motion animates offsetDistance from 0% to 100% on repeat, so set offsetDistance to ((frame / fps) / duration mod 1) × 100% in Remotion, or loop that tween on the paused HyperFrames timeline. Set size, the transition duration and the trail color through className (e.g. a bg gradient).
Used in
- Captioned talking clip
- Top-N listicle
- Quiz, poll & would-you-rather
- Meme format
- Countdown & launch timer
- Certificate & achievement recap
More entrances & emphasis
- Badge Pop —
npx hyperframes add badge-pop - Curtain Reveal —
npx hyperframes add curtain-reveal - Echo Smear —
npx hyperframes add echo-smear - Echo Trail —
npx hyperframes add echo-trail - Gloss Sweep —
npx hyperframes add gloss-sweep - Ink Bleed Reveal —
npx hyperframes add ink-bleed-reveal