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

ShineBorder

shine-border

Animates a gradient sheen around an element border.

Usage

Basic usage

ShineBorder is the absolute inset-0 streamer frame layer. Put it into the relative + rounded container to get the flowing shimmer of the entire frame. Default chart three-color gradient.

Shine Border
tsx
<div className="relative h-40 w-72 overflow-hidden rounded-xl bg-surface">
  <div className="grid h-full place-items-center text-sm text-muted-foreground">Shine Border</div>
  <ShineBorder />
</div>

Solid color · Thick edges

shineColor passes a single CSS color/token which is a single color streamer; borderWidth adjusts the border thickness.

Single
tsx
<ShineBorder borderWidth={2} shineColor="var(--color-primary)" />

Multi-color · Speed adjustment

shineColor passes the color array to form a multi-segment gradient; duration controls the number of seconds for one round of the streamer (the larger it is, the slower it is).

Multi · Fast
tsx
<ShineBorder
  shineColor={["var(--color-chart-2)", "var(--color-chart-4)", "var(--color-chart-1)"]}
  duration={8}
/>

When to Use

Use it when you want the entire border of the card/container to continuously flow gradient streamer (pure CSS, can be rendered on the RSC server). It is an absolute positioning cover that can be placed into the relative container. If you want a light point to go around the edge instead of a full-edge streamer, use BorderBeam; if you want to hover a light point diagonally and sweep a reflection, use GlareHover.

Import

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

Props

NameTypeDefaultDescription
borderWidthnumber1Border width px
durationnumber14Duration of one gradient cycle in seconds
shineColorstring | string[]Hulian chart tokenStreamer color, single color or multi-color array
classNamestring-Additional class name for the overlay
styleCSSProperties-Inline styles forwarded to the overlay

Usage Guidelines

  • Must be placed in the position:relative container, otherwise the border will be positioned incorrectly.
  • shineColor feeding token needs to be prefixed with --color-, and bare var(--primary) does not resolve - see [[hulian-token-color-var-needs-color-prefix]].
  • Pure CSS implementation, can be used directly in RSC, no need for "use client".

Related

BorderBeam · GlareHover · Lens · AnimatedBeam · OrbitingCircles · ProgressiveBlur

Playground

Shine Border
<div className="relative">
  ...content
  <ShineBorder borderWidth={1} duration={14} />
</div>
PreviousBorderBeamDecorationNextGlareHover

On this page

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