Animated Border
A conic-gradient beam that rotates around the border. Wraps any card.
import { motion } from "framer-motion";
export function AnimatedBorder({ children }) {
return (
<div className="relative overflow-hidden rounded-2xl p-[2px]">
<motion.div
className="absolute inset-[-60%]"
style={{ background: "conic-gradient(from 0deg, transparent 0deg, #4fa0ff 60deg, transparent 120deg)" }}
animate={{ rotate: 360 }}
transition={{ duration: 4, repeat: Infinity, ease: "linear" }}
/>
<div className="relative rounded-[14px] bg-[#0a0e1a] p-6">{children}</div>
</div>
);
}How it works
Animated Border is a hand-built card component for React, styled with Tailwind and animated with Framer Motion — no heavy dependency tree, no 60-package install. Drop it in, keep your bundle lean, and it stays performant on real devices. It's free — copy the code above and ship it.
← Browse all components