Traveling border beam accent
A single light beam that continuously travels around a container's border, drop it inside any card or button wrapper with `position: relative` and `overflow: hidden`. Cheap way to signal 'this is the highlighted plan' on a pricing card.
Live preview
open in new tab ↗import { Button } from "@/components/ui/button"
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "@/components/ui/card"
import { Input } from "@/components/ui/input"
import { Label } from "@/components/ui/label"
import { BorderBeam } from "@/components/magicui/border-beam"
export function BorderBeamDemo() {
return (
<Card className="relative w-[350px] overflow-hidden">
<CardHeader>
<CardTitle>Sign in</CardTitle>
<CardDescription>Enter your details to continue.</CardDescription>
</CardHeader>
<CardContent>
<div className="grid w-full items-center gap-4">
<div className="flex flex-col space-y-1.5">
<Label htmlFor="email">Email</Label>
<Input id="email" type="email" placeholder="Enter your email" />
</div>
</div>
</CardContent>
<CardFooter className="flex justify-between">
<Button variant="outline">Cancel</Button>
<Button>Continue</Button>
</CardFooter>
<BorderBeam duration={8} size={100} />
</Card>
)
}Block id: magicui-border-beamreact-tailwind · drop-in
More card blocks
Want the whole site, not just the block?
We ship real client sites in 3 weeks — with blocks like this one, wired to your brand.



