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

Orb

orb

Displays an animated shader orb with hover intensity and theme-aware color.

Usage

Basic usage

Orb fills the parent container (block h-full w-full), the size is determined by the outer square container; the default is blue and purple.

tsx
<div className="relative h-[280px] w-[280px] overflow-hidden rounded-2xl bg-bg">
  <Orb />
</div>

Hue rotation

hue Rotate in degrees YIQ Hue: Approximately 120 greenish, 60 amber, 300 mauve.

tsx
<Orb hue={120} />

Forced hover state

forceHoverState permanent glow + distortion, suitable for demonstrations/screenshots; hoverIntensity adjusts distortion intensity.

tsx
<Orb forceHoverState hoverIntensity={0.4} />

Size and Disable Rotation

The size is controlled by the outer container; rotateOnHover={false} turns off hover rotation.

tsx
<div className="relative h-40 w-40 overflow-hidden rounded-2xl bg-bg">
  <Orb rotateOnHover={false} />
</div>

When to Use

Use it as a luminous focal element in a hero, card, or empty state when hover should affect brightness, distortion, and rotation. The canvas fills its container, so the container determines the orb's size and should usually be square. For a full-surface liquid-metal background, use LiquidChrome; for a static dot or grid pattern, use DotPattern or GridPattern.

Import

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

Props

NameTypeDefaultDescription
huenumber0Hue rotation in degrees. 0 keeps the original blue-violet palette; positive values rotate the YIQ hue clockwise
hoverIntensitynumber0.2Hover distortion strength (0-1), the larger the value, the more obvious the deformation will be
rotateOnHoverbooleantrueWhether to automatically rotate the light ball when hovering
forceHoverStatebooleanfalseForce to stay active on hover (for demonstration/screenshot scenes)
classNamestring-ClassName passed through to canvas (normal) or fallback div (fallback)

Slots

SlotTypeDescription
fallbackReactNodereduced-motion / static fallback content without WebGL (centered on a radial gradient ball)

Usage Guidelines

  • WebGL components must be rendered on the client side; in the SSR environment, the first screen uses reduced-motion / radial gradient fallback without WebGL, and it is necessary to ensure that fallback or the default gradient ball is visible on the server.
  • Do not actively adjust loseContext to poison the canvas during cleanup, otherwise React StrictMode dual-mount reuse of the same canvas will directly collapse and become blank - see [[webgl-canvas-loseContext-poisons-strictmode-remount]]. The correct approach is to mount a new canvas each time.
  • The canvas fills the outer container. The outer layer must have a certain width and height (square is best), otherwise the light sphere will collapse and become invisible.

Related

DotPattern · GridPattern · StripedPattern · Spotlight · RetroGrid · Ripple

Playground

<div className="relative h-[280px] w-[280px] overflow-hidden rounded-2xl bg-bg">
  <Orb
    hue={0}
    hoverIntensity={0.2}
    rotateOnHover={true}
    forceHoverState={false}
  />
</div>
PreviousThreadsDecorationNextLiquidChrome

On this page

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