Glin UI
Primitive / AtomAdapted from Magic UIbeta

Shine Border

Animated gradient edge that wraps any rounded container.

Edit on GitHub

Sign in

Installation

Install from
pnpm dlx @glinui/cli@latest add shine-border

Credits. Adapted from Magic UI (MIT, (c) Magic UI). Token colors, Web Animations gated by motion level, logical RTL direction, a glass variant and no inline styles. Attribution details.

Prefer the package?

Usage

ShineBorder differs from BorderBeam: the beam is a single travelling dot, the shine is a soft gradient that drifts around the whole edge. The parent must be `relative` and have a border radius, which the layer inherits.

Improvement over the original: no inline style object, no hardcoded black default, and the animation is removed from the DOM when motion is none or reduced.

Engines: the `engine` prop is not applicable. Looping css conic-gradient animation; not a reveal, so engines do not apply.

Variants

glinr is the default, plain is flat shadcn, solid is a neutral tonal face, glass is opt-in and needs a backdrop.

glinr

Crisp on any stage.

Learn more

plain

Crisp on any stage.

Learn more

solid

Crisp on any stage.

Learn more

glass

Opt-in. Needs a backdrop.

Learn more
import { ShineBorder, Card } from "@glinui/ui"
// Omit `variant` to follow the ambient style (glinr by default).
export function ShineBorderVariants() {
return (
<>
<Card variant="glinr" className="relative">
<ShineBorder borderWidth={2} />
...
</Card>
<Card variant="plain" className="relative">
<ShineBorder borderWidth={2} />
...
</Card>
<Card variant="solid" className="relative">
<ShineBorder borderWidth={2} />
...
</Card>
<Card variant="glass" className="relative">
<ShineBorder borderWidth={2} />
...
</Card>
</>
)
}

Colors

`shineColor` takes one color or a list of tokens.

accent

The effect color follows the tone token.

Learn more

success

The effect color follows the tone token.

Learn more

warning

The effect color follows the tone token.

Learn more

danger

The effect color follows the tone token.

Learn more

info

The effect color follows the tone token.

Learn more
import { ShineBorder, Card } from "@glinui/ui"
export function ShineBorderTones() {
return (
<Card className="relative">
<ShineBorder shineColor={["var(--tone-success)", "var(--color-accent)"]} />
...
</Card>
)
}

In a layout

A pricing row where the highlighted plan wears the shine.

StarterBilled monthly

$0/ seat

  • Unlimited projects
  • Priority support
  • Audit log export
ProBilled monthly

$24/ seat

  • Unlimited projects
  • Priority support
  • Audit log export
TeamBilled monthly

$60/ seat

  • Unlimited projects
  • Priority support
  • Audit log export
// A pricing row where the highlighted plan wears the shine.
import { ShineBorder, Card } from "@glinui/ui"
export function ShineBorderLayout() {
return (
<section className="grid gap-4 sm:grid-cols-3">
...
</section>
)
}

Accessibility

  • Purely decorative: aria-hidden and pointer-events-none, never receives focus or intercepts clicks.
  • Hidden under forced-colors so the parent keeps its real border.
  • No information is conveyed by the animation.

ARIA Attributes

  • `aria-hidden="true"` on the layer
  • `data-animated` reflects whether the sweep is running

Reduced Motion

The sweep only runs when the Glin motion level is full and prefers-reduced-motion is off. Otherwise the border renders as a static gradient frame.

Affected properties

background-position sweep

API Reference

PropTypeRequiredDefaultDescription
variant"default" | "plain" | "glass"Nodefault`plain` shines in the foreground color for flat cards, `glass` uses a bright additive shine suited to translucent surfaces.
borderWidthnumberNo1Border thickness in pixels.
durationnumberNo14Seconds for one sweep cycle.
shineColorstring | string[]Novar(--color-accent)One color or a list of colors for the gradient stops.

Source

Import directly from the package or browse the source on GitHub. Click any file to view it.

Import

import { ShineBorder } from "@glinui/ui"

Dependencies

@glinui/ui@glinui/motionclass-variance-authority

Generated API Snapshot

Beta

Auto-extracted from TypeScript source in packages/ui/src/components/shine-border.tsx. This section is in beta and may lag behind hand-curated docs. Regenerate with pnpm --filter @glinui/docs api:generate.

Generated: 2026-10-08T01:41:21.546Z · Full index: /docs/api-metadata

Primary Props Type

ShineBorderProps

ShineBorderProps

PropTypeRequiredDefaultDescription
borderWidthnumberNo1Border thickness in pixels.
durationnumberNo14Seconds for one full sweep cycle.
shineColorstring | string[]No-One color or a list of colors. Defaults to the accent token.
variant"default" | "plain" | "glass"No"default"Variant option from shineBorderVariants.