Dmitry

Border Beam

Cards 156

About

An animated beam of light that travels along the border of a container to highlight cards, buttons, and inputs.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Border Beam to your project and fits it to your theme.

Code

How Border Beam is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import { BorderBeam } from "@/components/ui/border-beam";

const settings = {
  size: 200,
  duration: 12,
  delay: 0,
  colorFrom: "#ffaa40",
  colorTo: "#9c40ff",
  borderWidth: 1.5,
  squircle: false,
};

export default function Demo(props: Partial<typeof settings>) {
  const s = { ...settings, ...props };
  return (
    <div className="flex h-screen w-screen items-center justify-center bg-background">
      <div className="relative h-[180px] w-[320px] overflow-hidden rounded-xl border bg-card">
        <BorderBeam
          size={s.size}
          duration={s.duration}
          delay={s.delay}
          colorFrom={s.colorFrom}
          colorTo={s.colorTo}
          borderWidth={s.borderWidth}
          squircle={s.squircle}
        />
      </div>
    </div>
  );
}

More by Dmitry

View all
  • Features Grid

    Features Grid

    104
  • Rating

    Rating

    1
  • Tap Coin

    Tap Coin

  • Header — Magazine

    Header — Magazine

  • Header — Mega Menu

    Header — Mega Menu

  • Header — Morphing

    Header — Morphing

  • Morphing Header

    Morphing Header

  • Theme Customizer

    Theme Customizer

More in Cards

View all
  • Course Design Cards

    Course Design Cards

    1.4K
  • Stats cards with links

    Stats cards with links

    46
  • Statistics Card 7

    Statistics Card 7

    342
  • Statistics Card 2

    Statistics Card 2

    322
  • Card Studio

    Card Studio

    37
  • Card

    Card

    65
  • Admin Dashboard Cards

    Admin Dashboard Cards

    44
  • Interactive Tech Stack Bento Grid with Hover Effects

    Interactive Tech Stack Bento Grid with Hover Effects

    779