# Shine Border

> Drift a soft sheen along an element's border to give it quiet emphasis.

Source: https://www.honestui.com/docs/animated/shine-border

```tsx
import { ShineBorder } from "@/registry/default/animated/shine-border";

export function ShineBorderDemo() {
  return (
    <div className="relative w-80 rounded-xl border border-border bg-card p-5">
      <p className="text-[13px] text-muted-foreground">Pro plan</p>
      <p className="mt-2 text-2xl font-semibold tracking-tight text-foreground">
        $24<span className="text-sm font-normal text-muted-foreground"> / month</span>
      </p>
      <ul className="mt-4 space-y-1.5 text-xs text-muted-foreground">
        <li>Unlimited projects</li>
        <li>Priority support</li>
        <li>Audit log and SSO</li>
      </ul>
      <ShineBorder />
    </div>
  );
}

```

## Overview [#overview]

Shine Border paints a slow, soft sheen that drifts around its parent's border. It suits a recommended pricing plan, a featured card, or a sign-in panel where a static border feels flat but a travelling beam would feel too busy. By default the sheen uses tints of the foreground color, so it works in light and dark themes without extra configuration.

## Installation [#installation]

<CliBlock commands="[&#x22;shine-border&#x22;]" />

## Usage [#usage]

```tsx
import { ShineBorder } from "@/components/animated/shine-border"

<div className="relative rounded-xl border p-5">
  Pro plan
  <ShineBorder colors={["#a1a1aa", "#e4e4e7"]} />
</div>
```

Place it inside a `relative` element. It inherits the parent's border radius and draws over the existing border, so keep the parent's border subtle.

## Accessibility [#accessibility]

The sheen is decorative and hidden from assistive technology. Do not rely on it to signal state or selection. When reduced motion is requested, it stops and holds a still highlight.

## API Reference [#api-reference]


  ### `colors`

type: `string[]`

Colors the sheen passes through. Defaults to foreground tints.

  ### `duration`

type: `number` · default: `12`

Seconds for one sweep and back.

  ### `borderWidth`

type: `number` · default: `1`

Width of the shining border in px.

  ### `className`

type: `string`

Classes for the border layer.
