Hulian UIv0.93.5413 components0 components
  • Start
  • Components
  • Blocks
  • Pages
  • Demos
  • Changelog
ChineseEnglish
  • ComponentsComponents
  • ThemeTheme

Backgrounds

  • DotPattern
  • GridPattern
  • StripedPattern
  • Spotlight
  • FadeMask
  • RetroGrid
  • Ripple
  • Meteors
  • Aurora
  • Particles
  • FlickeringGrid
  • WavyBackground
  • Silk
  • Iridescence
  • Threads
  • Orb
  • LiquidChrome
  • Balatro
  • Ballpit
  • Beams
  • ColorBends
  • DarkVeil
  • Dither
  • DotField
  • EvilEye
  • FaultyTerminal
  • Ferrofluid
  • FloatingLines
  • Galaxy
  • GradientBlinds
  • Grainient
  • GridDistortion
  • GridMotion
  • GridScan
  • Hyperspeed
  • LetterGlitch
  • Lightfall
  • Lightning
  • LightPillar
  • LightRays
  • LineWaves
  • LiquidEther
  • PixelBlast
  • PixelSnow
  • Plasma
  • PlasmaWave
  • Prism
  • PrismaticBurst
  • Radar
  • RippleGrid
  • ShapeGrid
  • SideRays
  • SoftAurora

Overlay Effects

  • BorderBeam
  • ShineBorder
  • GlareHover
  • Lens
  • AnimatedBeam
  • OrbitingCircles
  • ProgressiveBlur
  • CardSpotlight
  • Reveal
  • Antigravity
  • BlobCursor
  • ClickSpark
  • Crosshair
  • ElectricBorder
  • GhostCursor
  • GradualBlur
  • ImageTrail
  • LaserFlow
  • MagicRings
  • Magnet
  • MagnetLines
  • MetaBalls
  • MetallicPaint
  • OrbitImages
  • PixelTrail
  • PixelTransition
  • Ribbons
  • ShapeBlur
  • SplashCursor
  • StarBorder
  • StickerPeel
  • TargetCursor
  • Cubes
  • Tilt
  • BorderGlow
  • GlassIcons
  • GlassSurface
  • Lanyard
  • ModelViewer
  • FluidGlass

BorderGlow

border-glow

Lights a card border and outer glow according to pointer proximity.

Usage

Basic usage

Move the pointer over the card, and the border will light up along the light cone. A dark background is required.

Hulian component library

Move the pointer over the card and the border will light up along the light cone.

tsx
<div
  className="rounded-xl p-12"
  style={{ background: "oklch(0.13 0.02 280)" }}
>
  <BorderGlow>
    <div className="w-64 p-7">
      <p className="text-base font-semibold text-white">Hulian Component Library</p>
      <p className="mt-1.5 text-sm text-white/55">Move the pointer over the card, and the border will light up along the light cone. </p>
    </div>
  </BorderGlow>
</div>

Mount automatic scanning

When animated is mounted, it will scan around the edge without a pointer; when reduced-motion is used, it will be skipped automatically.

Automatic scanning

Automatically circle the edge when mounting, skipping under reduced-motion.

tsx
<BorderGlow animated>
  <div className="w-64 p-7">
    <p className="text-base font-semibold text-white">Automatic scanning</p>
    <p className="mt-1.5 text-sm text-white/55">Automatically wrap around the edge when mounting. </p>
  </div>
</BorderGlow>

Customized glow color

glowColor / colors all go to chart token, automatically take the light and dark theme.

Cyan neon

Glow color/Grid color full range chart token.

tsx
<BorderGlow
  glowColor="var(--color-chart-2)"
  colors={[
    "var(--color-chart-2)",
    "var(--color-chart-4)",
    "var(--color-chart-5)",
  ]}
  glowRadius={56}
>
  <div className="w-64 p-7">
    <p className="text-base font-semibold text-white">Cyan neon</p>
  </div>
</BorderGlow>

High sensitivity + strong halo

Turn down edgeSensitivity to trigger earlier, turn up glowIntensity / coneSpread to strengthen the highlight arc.

High energy frame

Earlier trigger, stronger halo, wider highlight arc.

tsx
<BorderGlow
  edgeSensitivity={10}
  glowIntensity={1.6}
  coneSpread={40}
>
  <div className="w-64 p-7">
    <p className="text-base font-semibold text-white">High energy frame</p>
  </div>
</BorderGlow>

When to Use

Use it for a content card whose colored edge and outer neon halo follow the nearby pointer. It can also play one automatic sweep after mounting. Use BorderBeam or ShineBorder to decorate an existing element, and GlareHover for a hover reflection. BorderGlow owns the whole card and its pointer-tracking cone.

Import

ts
import { BorderGlow } from "@hulianui/ui"

Props

Extends <div> attributes, with the native color attribute omitted.

NameTypeDefaultDescription
classNamestring-Transparent root container className (merged into .border-glow)
edgeSensitivitynumber30Edge sensitivity 0-100, the smaller it is, the earlier the outer halo is triggered
glowColorstringvar(--color-chart-1)Outer halo color (box-shadow), token must be prefixed with --color-
backgroundColorstringoklch(0.16 0.02 280)Card background; the glow relies on dark contrast and is weaker on light surfaces
borderRadiusnumber28corner radius px
glowRadiusnumber40The outer halo overflows the inner margin px, the larger it is, the farther it spreads
glowIntensitynumber1Glow intensity magnification 0-2
coneSpreadnumber25Light cone angle width 0-50, the larger the width, the wider the highlight arc
animatedbooleanfalseAutomatically play a circle of sweeping light when mounted; skip under reduced-motion
colorsstring[]chart-1/3/4Color grid border selection, circularly mapped to 7 radial anchor points
fillOpacitynumber0.5Edge color fill layer transparency 0-1
styleCSSProperties-Inline styles forwarded to the root container

Slots

SlotTypeDescription
childrenReactNodeCard content, layered on top of all glowing layers

Usage Guidelines

  • The luminous border relies on dark background contrast, and the effect is significantly weaker when placed on a light background; use backgroundColor to maintain a dark background.
  • glowColor/colors feed token must be prefixed with --color- (Tailwind v4 real name), and bare var(--primary) does not resolve. See [[hulian-token-color-var-needs-color-prefix]].
  • Both pointer tracking and animated sweeping are affected by reduced-motion: users prefer to automatically skip sweeping when reducing the animation (the DOM remains unchanged).

Related

BorderBeam · ShineBorder · GlareHover · Lens · AnimatedBeam · OrbitingCircles

Playground

Hulian BorderGlow

Move in or turn on scanning to view the luminous border.

<div className="rounded-xl p-12" style={{ background: "oklch(0.13 0.02 280)" }}>
  <BorderGlow
    edgeSensitivity={30}
    glowRadius={40}
    glowIntensity={1}
    coneSpread={25}
    borderRadius={28}
    animated={false}
  >
    <div className="w-64 p-7">…</div>
  </BorderGlow>
</div>
PreviousTiltDecorationNextGlassIcons

On this page

  • Usage
  • Documentation
    • When to Use
    • Import
    • Props
    • Slots
    • Usage Guidelines
    • Related
  • Playground