Border Beam
wise-ui/border-beamFreeComponent
A card with an animated beam traveling along its border.
Live preview
live · rendered by the registry
Rendered by wise-ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://wise-ui.com/r/border-beam.jsonSource
1"use client"23import * as React from "react"4import { motion } from "motion/react"5import { cn } from "@/registry/wise-ui/lib/utils"67interface BorderBeamProps {8 size?: number9 duration?: number10 delay?: number11 color?: string12 className?: string13}1415function BorderBeam({16 size = 80,17 duration = 6,18 delay = 0,19 color = "hsl(var(--primary))",20 className,21}: BorderBeamProps) {22 return (23 <div24 className={cn(25 "pointer-events-none absolute inset-0 overflow-hidden rounded-[inherit]",26 className27 )}28 >29 <motion.div30 className="absolute inset-0"31 style={{32 background: `conic-gradient(from 0deg, transparent 0%, transparent 70%, ${color} 85%, transparent 100%)`,33 width: "200%",34 height: "200%",35 left: "-50%",36 top: "-50%",37 }}38 animate={{ rotate: 360 }}39 transition={{40 duration,41 delay,42 repeat: Infinity,43 ease: "linear",44 }}45 />46 {/* Inner mask to show only the border strip */}47 <div className="absolute inset-[1.5px] rounded-[inherit] bg-background" />48 </div>49 )50}51BorderBeam.displayName = "BorderBeam"5253export { BorderBeam }54export type { BorderBeamProps }
What it pulls in
npm packages
Files it writes
More from wise-ui
All 20 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Animated Tabsanimated-tabs | wise-ui | Components | Free | 3 deps | |
| Data Tabledata-table | wise-ui | Components | Free | 3 deps | |
| Dockdock | wise-ui | Components | Free | 3 deps | |
| Dot Matrixdot-matrix | wise-ui | Components | Free | 2 deps | |
| Editable Texteditable-text | wise-ui | Components | Free | 4 deps | |
| Gradient Sidebargradient-sidebar | wise-ui | Components | Free | 3 deps | |
| Kanban Boardkanban-board | wise-ui | Components | Free | 6 deps | |
| Magnetic Buttonmagnetic-button | wise-ui | Components | Free | 3 deps |
