Border Beam
Border Beam draws a decorative moving highlight around a containing surface.
Practical React example
Frame one featured card with a moving border accent.
Before you copy and paste
Match the imported component’s client or server rendering boundary before using the example. Copy components/magicui/border-beam.tsx and its returned support files from the Code tab; preserve the project-relative paths.
Listed package dependencies: motion.
Use the Code tab for the component files and installation instructions, then adapt the imports in this example to your project.
Frame one featured card with a moving border accent
// Usage adapted from Magic UI's pinned MIT source.
// Copyright (c) Magic UI. See ./LICENSES.md.
'use client';
import { BorderBeam } from "@/components/magicui/border-beam"
export function ComponentExample() {
return (
<div className="relative h-[500px] w-full overflow-hidden">
<BorderBeam />
</div>
);
}
Usage example adapted from Magic UI's pinned MIT source. Retain the source licence notices when copying.
Use a relatively positioned card with an intentional border radius and clipping treatment. Tune size and duration to the card’s dimensions.
Customization
- BorderBeamProps.size
- Optional; number. The size of the border beam.
- BorderBeamProps.duration
- Optional; number. The duration of the border beam.
- BorderBeamProps.delay
- Optional; number. The delay of the border beam.
- BorderBeamProps.colorFrom
- Optional; string. The color of the border beam from.
- BorderBeamProps.colorTo
- Optional; string. The color of the border beam to.
- BorderBeamProps.transition
- Optional; Transition. The motion transition of the border beam.
- BorderBeamProps.className
- Optional; string. The class name of the border beam.
- BorderBeamProps.style
- Optional; React.CSSProperties. The style of the border beam.
- BorderBeamProps.reverse
- Optional; boolean. Whether to reverse the animation direction.
- BorderBeamProps.initialOffset
- Optional; number. The initial offset position (0-100).
- BorderBeamProps.borderWidth
- Optional; number. The border width of the beam.
Integration notes
- Do not let the border effect cover focus rings or imply a selected state that does not exist.
- Check the static appearance and reduced-motion behavior independently of the animation.
Component source: Magic UI documentation . These examples describe the version imported into Rendyn. Upstream APIs may have changed; retain the source licence notices when adapting the code.
Give your agent taste.
The best way to use Rendyn is through MCP. Let your agent find the right component, compare previews and bring the source into your project.
All components are free. Sign up only to connect MCP.