# GlowBorder

> Liquid-metal ring for a container's edge: two metallic conic fields turning against each other make iridescent reflections flow along a dark chrome border, while a glint rides around it and spills a soft glow; chromatic, silver and gold presets or custom tints.

- Package: `fancy-ui-react` (React 18/19 + Tailwind CSS v4)
- Category: Effects
- Tags: border, glow, animation, gradient, decoration, metal, chrome, beam
- Types: `GlowBorderPreset`, `GlowBorderProps`
- Docs: https://fancy-ui.rama.app/docs/components/glow-border
- Source: https://github.com/RamaHerbin/fancy-ui/tree/main/react/src/components/glow-border

## Import

```tsx
import { GlowBorder } from 'fancy-ui-react';
```

Setup (once per project): `npm install fancy-ui-react`, then put these lines in your main CSS file (the stylesheet import goes right after `@import "tailwindcss";`):

```css
@import "tailwindcss";
@import "fancy-ui-react/tailwind.css";
```

and import the component styles once in the app entry: `import "fancy-ui-react/styles.css";`. Full guide: https://fancy-ui.rama.app/llms.txt

The names below are the ones to write in React; when one differs from the Svelte name, the Svelte name follows in parentheses. `class` becomes `className`, a callback takes the name the React port declares (`onclick` becomes `onClick`), snippets become `ReactNode` props (render functions when they take arguments) and the default snippet is `children`. Divergences: https://github.com/RamaHerbin/fancy-ui/tree/main/react#divergences-from-the-svelte-api

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `preset` | `"chromatic" \| "silver" \| "gold"` | `"chromatic"` | Metal palette: iridescent chrome, cool steel or warm gold |
| `color` | `string \| string[]` | — | Custom tints for the metal's reflections, woven with neutral metal tones; overrides preset |
| `strength` | `number` | `0.8` | Intensity of the glint and its glow, 0 to 1 |
| `borderRadius` | `number` | `10` | Border radius in pixels; the ring also inherits its parent's radius |
| `borderWidth` | `number` | `1.5` | Width of the metal ring in pixels |
| `duration` | `number` | `10` | Length of one flow cycle of the metal in seconds; the glint laps in 0.4x that |
| `className` (Svelte `class`) | `string` | — | Additional classes on the overlay |

## Example

```tsx
import { GlowBorder } from "fancy-ui-react";

export function GlowBorderExample() {
	return (
		<div className="bg-background relative flex h-40 w-64 items-center justify-center rounded-xl p-6">
			<p className="text-muted-foreground text-center">Content goes here</p>
			<GlowBorder />
		</div>
	);
}
```
