appica-dev

Border Beam

Cards 21

About

An animated glowing comet that travels around an element's border, used to draw attention to cards, buttons, or loading states.

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 CARD =
  "bg-background border-border text-foreground flex min-h-24 items-center justify-center rounded-2xl border px-5 text-center text-sm";

export default function BorderBeamColor() {
  return (
    <div className="flex flex-wrap items-center justify-center gap-6">
      <BorderBeam className="w-40 rounded-2xl" length={20}>
        <div className={CARD}>Primary</div>
      </BorderBeam>
      <BorderBeam
        className="w-40 rounded-2xl"
        color="var(--secondary-emphasis)"
        length={20}
      >
        <div className={CARD}>Secondary</div>
      </BorderBeam>
      <BorderBeam
        className="w-40 rounded-2xl"
        color="var(--success-emphasis)"
        length={20}
      >
        <div className={CARD}>Success</div>
      </BorderBeam>
      <BorderBeam className="w-40 rounded-2xl" color="#A78BFA" length={20}>
        <div className={CARD}>Custom</div>
      </BorderBeam>
    </div>
  );
}

More by appica-dev

View all
  • Carousel

    Carousel

    25
  • Text Animate

    Text Animate

    24
  • Avatar

    Avatar

    19
  • Table of Contents

    Table of Contents

    10
  • Sparkline

    Sparkline

    10
  • Background Pattern

    Background Pattern

    9
  • Color Area

    Color Area

    7
  • Alert

    Alert

    3

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

    778