OPUS/UI

Navigation

Gradient Border

A container with a rotating multi-colour border and an optional blurred halo.

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

~/opus

$ node scripts/add.mjs fluid

✓ copied 3 files · 0 deps

Installation

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

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

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

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

Usage

import { GradientBorder } from "@/components/opus/effects/gradient-border";

<GradientBorder className="rounded-2xl"><div className="p-6">…</div></GradientBorder>

API

PropTypeDefaultDescription
colorsstring[]—Gradient stops (repeat the first at the end for a seamless loop).
widthnumber1.5Border thickness (px).
durationnumber4Seconds per rotation (0 = static).
glownumber0.5Halo opacity.

Command palette