Border Beam Card
A point of light that continuously travels the border ring.
- cards
- glow
- card
- effect
- border
- beam
- ambient
Live users
1,204
Quick usage
usage
import { BorderBeamCard } from "@pinky-ui/components";
<BorderBeamCard duration={6}>
<StatCard label="Live users" value="1,204" />
</BorderBeamCard>Presets
Default
A 6-second loop.
Install
Add @pinky-ui/components as a dependency, or use the CLI to copy this component's source directly into your project — no dependency to manage, fully editable.
shell
npm install @pinky-ui/componentsshell
pnpm add @pinky-ui/componentsshell
yarn add @pinky-ui/componentsshell — copies source into your project
npx pinky-ui add border-beam-cardPrefer to run the whole repository locally instead?
repository
git clone https://github.com/florash/Pinky-UI.git
cd Pinky-UI
npm install
npm run devProps
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | — | Required. |
| thickness | number | 1.5 | Border thickness in px. |
| duration | number | 6 | One full loop, in seconds. |
| color | string | var(--color-blush-300) | The beam's colour. |
| radius | "md" | "lg" | "xl" | "2xl" | "xl" | Corner radius from the shape scale. |
| as | ElementType | "div" | Pass Link from next/link to make the whole card navigable. |
| href | string | — | Only meaningful when as renders an anchor. |
| onClick | () => void | — | Makes the card a click target; adds the focus-visible ring automatically. |
Accessibility
- Same focus-visible rule as Basic Card once onClick/href is present.
- The beam is decorative and aria-hidden.
Reduced motion
The beam stops at a fixed point on the ring under prefers-reduced-motion: reduce, rather than looping forever.
When to use
- The one card on a page that should read as live or ambient — a status card, a single featured item
When not to use
- A grid where several would run at once — a room full of continuously moving beams reads as noisy, not premium