Components
An animated beam of light that travels along the border of a container to highlight cards, buttons, and inputs.

import { BorderBeam } from "@/components/ui/border-beam";
const settings = {
size: 200,
duration: 12,
delay: 0,
colorFrom: "#ffaa40",
colorTo: "#9c40ff",
borderWidth: 1.5,
squircle: false,
};
export default function Demo(props: Partial<typeof settings>) {
const s = { ...settings, ...props };
return (
<div className="flex h-screen w-screen items-center justify-center bg-background">
<div className="relative h-[180px] w-[320px] overflow-hidden rounded-xl border bg-card">
<BorderBeam
size={s.size}
duration={s.duration}
delay={s.delay}
colorFrom={s.colorFrom}
colorTo={s.colorTo}
borderWidth={s.borderWidth}
squircle={s.squircle}
/>
</div>
</div>
);
}