Border Beam
Light beam that travels along the border of its container via CSS offset-path.
pnpm dlx @glinui/cli@latest add border-beam$48,920
Up from $43,520 last month
Installation$
pnpm dlx @glinui/cli@latest add border-beamPrefer the package?
Usage$
Wrap any container with position: relative and place BorderBeam inside. The beam travels along the border using CSS offset-path.
A beam of accent light travels the edge of a glinr metrics card. The beam is a decorative overlay, so the card underneath keeps its normal surface.
Examples$
Variants$
glinr is the default, plain is the flat shadcn look, solid is a neutral tonal face and glass is opt-in. Glass needs a backdrop, so the set below sits on a vivid one.
glinr
Crisp on any stage.
Learn moreplain
Crisp on any stage.
Learn moresolid
Crisp on any stage.
Learn moreglass
Opt-in. Needs a backdrop.
Learn moreimport { BorderBeam, Card } from "@glinui/ui"
// Omit variant to follow the ambient style (glinr by default).export function BorderBeamVariants() {return ( <> <Card variant="glinr" className="relative"><BorderBeam size={180} /> ... </Card> <Card variant="plain" className="relative"><BorderBeam size={180} /> ... </Card> <Card variant="solid" className="relative"><BorderBeam size={180} /> ... </Card> <Card variant="glass" className="relative"><BorderBeam size={180} /> ... </Card> </>)}Colors$
colorFrom takes any token or color.
accent
The effect color follows the tone token.
Learn moresuccess
The effect color follows the tone token.
Learn morewarning
The effect color follows the tone token.
Learn moredanger
The effect color follows the tone token.
Learn moreinfo
The effect color follows the tone token.
Learn moreimport { BorderBeam, Card } from "@glinui/ui"
export function BorderBeamTones() {return ( <Card className="relative"><BorderBeam colorFrom="var(--tone-success)" /> ... </Card>)}In a layout$
Beam cards as metric tiles in a dashboard row.
Overview
Last 7 days// Beam cards as metric tiles in a dashboard row.import { BorderBeam, Card } from "@glinui/ui"
export function BorderBeamLayout() {return ( <section className="grid gap-4 sm:grid-cols-3"> ... </section>)}Engines$
The engine prop is not applicable. Looping offset-path beam in css; path driven. It stays css only and still honors motion level none and reduced motion.
Accessibility$
BorderBeamis purely decorative and does not receive focus.- No interactive elements, safe for screen readers.
Reduced Motion$
The beam animation uses motion-reduce:hidden. Under prefers-reduced-motion, the beam is hidden entirely.
API Reference$
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
borderRadius | string | No | - | Auto-generated from TypeScript source. |
colorFrom | string | No | "var(--color-accent)" | Auto-generated from TypeScript source. |
colorTo | string | No | "transparent" | Auto-generated from TypeScript source. |
delay | number | No | 0 | Auto-generated from TypeScript source. |
duration | number | No | 6 | Auto-generated from TypeScript source. |
size | number | No | 100 | Auto-generated from TypeScript source. |
Source$
import { BorderBeam } from "@glinui/ui"Generated API Snapshot
Beta
Generated API Snapshot
BetaAuto-extracted from TypeScript source in packages/ui/src/components/border-beam.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
BorderBeamProps
BorderBeamProps
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
borderRadius | string | No | - | - |
colorFrom | string | No | "var(--color-accent)" | - |
colorTo | string | No | "transparent" | - |
delay | number | No | 0 | - |
duration | number | No | 6 | - |
size | number | No | 100 | - |