Glow Border Card
A stunning animated card with a rotating conic gradient that creates a beautiful inner glow effect. The animation runs continuously without requiring hover.
Install using CLI
npx shadcn@latest add "https://vengeance-ui.vercel.app/r/glow-border-card.json"Install Manually
1
Install dependencies
2
Add util file
lib/utils.ts
3
Add styles to global CSS
Add the following styles to your app/globals.css file
4
Copy the source code
Copy the code below and paste it into components/ui/glow-border-card.tsx
Color Presets
Choose from built-in color themes or create your own custom gradient.
Custom Gradient
Pass your own array of colors to create unique effects.
Usage
Props
| Prop Name | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | - | Content to display inside the card. |
| width | string | "320px" | Width of the card. |
| height | string | - | Height of the card. If not set, aspectRatio is used. |
| aspectRatio | string | "1" | Aspect ratio (e.g., "1", "16/9", "4/3"). |
| borderRadius | string | "0.75rem" | Corner radius of the card. |
| animationDuration | number | 4 | Rotation speed in seconds. |
| colorPreset | "aurora" | "ocean" | "sunset" | "nature" | "custom" | "custom" | Preset color theme. |
| gradientColors | string[] | - | Custom array of colors. Overrides colorPreset. |
| borderWidth | string | "1.25em" | Thickness of the glow border. |
| blurAmount | string | "0.75em" | Blur intensity for the glow. |
| inset | string | "-1em" | How far the glow extends inward. |
| paused | boolean | false | Pause the rotation animation. |
| className | string | - | Additional classes for the container. |