Border beamPro
A light that travels around an element's border.
$
pnpm dlx shadcn@latest add @lode/border-beamLive preview
Pro plan
Every component, block and template. New releases every week.
When to use
- Drawing the eye to one card: the recommended plan, a new feature.
When not to use
- More than one element per view.
Installation
$
pnpm dlx shadcn@latest add @lode/border-beamPro components need an API key and the registry in components.json. See CLI and API keys.
1Copy the source into your project
Usage
Import it from @/components/ui/border-beam after installing.
example.tsx
import { BorderBeam } from "@/components/ui/border-beam";
export function Highlight() {
return <BorderBeam className="rounded-xl p-6">Pro</BorderBeam>;
}API reference
BorderBeam
A light that travels around the border.
duration= 6
number
Seconds per lap.
color= var(--brand)
string
Beam color.
| Prop | Type | Default | Description |
|---|---|---|---|
| duration | number | 6 | Seconds per lap. |
| color | string | var(--brand) | Beam color. |
Accessibility
- Decorative and aria-hidden; static under reduced motion.
Motion
- A conic gradient rotates around the border.
Responsive behavior
- Follows the element's radius.
Performance
- Pure CSS with an animated custom property.
Notes for AI
- Give it a border radius class.
This page as Markdown, for assistants and coding agents:
/components/border-beam/markdownThe full library index for assistants is at /llms.txt.
Related
Lode·229 doc pages·llms.txt