appica-dev

Border Beam

Cards 20

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.3K
  • Weather Card

    Weather Card

    69
  • Statistics Card 7

    Statistics Card 7

    340
  • Stats cards with links

    Stats cards with links

    102
  • Statistics Card 2

    Statistics Card 2

    316
  • Approval Card

    Approval Card

    37
  • Recipe Card

    Recipe Card

    53
  • The Item one

    The Item one

    4