Border Beam
ComponentsBorder Beam
CardsNew

Border Beam

A fine trace of light that travels around a surface and brings its edges to life.

React + CSS
GOOD IDEAS DESERVE THE SPOTLIGHT

Made to
stand out.

A little glow. A lot of character.
Follow the finer details.
Live component. Go ahead, interact.
Accent
01

Installation

Run this in your shadcn-configured React project. The component and stylesheet are added together.

TERMINAL
npx shadcn@latest add http://localhost:5173/r/border-beam.json

This command uses the current site address. For localhost, keep this preview running on the same computer. Files follow your configured components alias.

02

Usage

Import the component and make the details your own.

TypeScript
import { BorderBeam } from '@/components/anticraft/BorderBeam';

export function Example() {
  return (
    <BorderBeam style={{ padding: '2rem' }}>
      <h3>Worth a closer look.</h3>
      <p>Let the details do the talking.</p>
    </BorderBeam>
  );
}
03

Props

PropTypeDefaultDescription
childrenReactNode—Content inside the bordered surface.
durationnumber8The duration of a complete border loop in seconds, clamped between 1 and 180.
colorstring'#f19451'The CSS accent color of the moving beam.
pausedbooleanfalsePauses the border animation.
classNamestring''Additional classes. Native div attributes and inline styles are supported.
04

Motion & accessibility

Considered by default.

The moving border becomes a static accent when reduced motion is preferred.

Use semantic content and meaningful labels in your composition. Check contrast and keyboard behavior with your own styles and content.