Pro plan
$12 per month
Every component, block and theme, plus updates as they ship.
Installation
$ pnpm dlx shadcn@latest add @synccn/border-beamFirst time in this project? Connect synccn with one command.
Usage
import { BorderBeam } from "@/components/ui/border-beam";<div className="relative overflow-hidden rounded-xl"> … <BorderBeam /></div>API reference
Generated from the component's TypeScript types, so it always matches the code.
BorderBeam
A short light that travels around its parent's border. Place inside a `relative overflow-hidden rounded-*` element.
- size
numberDefault
120Length of the light in pixels.
- duration
numberDefault
6Seconds per lap.
- delay
numberDefault
0Seconds to offset the start.
- colorFrom
stringDefault
"var(--primary)"Colour at the head of the light.
- colorTo
stringDefault
"transparent"Colour at the tail.
- borderWidth
numberDefault
1.5Border thickness in pixels.
- className
stringExtra classes for the root element.
Dependencies
Read from the component's imports when the site builds. The CLI installs all of these for you.
Accessibility
From the source
Read from this component's code when the site builds, so it can't drift.
No ARIA roles, key handling or motion settings in its source. It renders plain elements, so its accessibility comes from the content and labels you give it.