OPUS/UI

Navigation

Border Beam

A light that races around its parent’s border, inheriting the radius. Stack several with delays for orbiting comets.

css@propertyconic-gradient2 files · 70 locdeps: clsx, tailwind-merge

Pro plan

$24/mo

  • ✓ Unlimited projects
  • ✓ Priority builds
  • ✓ 1 TB bandwidth
LIVE

Installation

With the shadcn CLI, pointing at this platform’s registry:

npx shadcn@latest add https://opusui.131199999.xyz/r/border-beam.json

Or offline, straight from your opus55 checkout (copies every file it needs):

node ../tailwind_component/opus55/scripts/add.mjs border-beam

Usage

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

<div className="relative rounded-2xl border">
  <BorderBeam />
  …
</div>

API

PropTypeDefaultDescription
colorFrom / colorTostring—Head and tail colours.
durationnumber6Seconds per lap.
widthnumber1.5Border thickness (px).
lengthnumber0.18Beam length (fraction of a lap).
delaynumber0Start offset (0–1 of a lap).
reverseboolean—Counter-clockwise.

Notes

  • Animates a registered @property angle — no JS. Parent needs position: relative.

Command palette