Components / Effects

Gradient

A gradient drawn on the frame's line, in any colours and at any angle, optionally turning around the frame.

Gradient border

90°

Customize

Angle
90°
Line
2px
Radius
12px
Spin
Turn time
4s

Installation

npx shadcn@latest add https://fancyborders.vercel.app/r/frame-effects.json

The CLI copies the component into your project, adds anything it is built on, and writes its CSS into your global stylesheet. New to the CLI? See Installation.

Examples

Coloured by utilities

frame-from-*, frame-via-* and frame-to-* on the frame colour every effect layer inside it.

frame-via-indigo-300

A turning comet

Fade the gradient to transparent and spin it for a light that sweeps the border.

spin

API reference

FrameGradient

tsx
import { FrameGradient } from "@/components/ui/frame-effects";
PropTypeDefault
colorsstring[]

Colour stops, in order. Without them the layer reads the frame-from-*, frame-via-* and frame-to-* utilities.

–
gradientstring

Any CSS image, in place of the gradient built from the colours.

–
anglenumber | string

Direction of the gradient. Numbers are degrees.

135
spinboolean | number

Turn the gradient around the frame. A number is the seconds one turn takes; true is 4.

false
thicknessnumber | string

Line width, when different from the frame's.

–
offsetnumber | string

Distance from the frame's edge. Positive is outward, negative inward.

0
radiusnumber | string

Overrides the frame's radius for this layer.

–

Also accepts every div attribute, such as className and style.