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

SoftAurora

soft-aurora

Layers two noise-driven gradients into a soft pointer-responsive aurora backdrop.

Usage

Basic usage

Set a layer of positioning containers, and SoftAurora can be used as a soft light background if it is completely covered.

tsx
<div className="relative h-56 overflow-hidden rounded-xl"
     style={{ background: "oklch(0.14 0.02 255)" }}>
  <SoftAurora className="absolute inset-0" />
</div>

Customized double-layer color matching

color1 / color2 accepts any CSS color string (hex / oklch / chart token), and the two layers are misaligned and superimposed to produce mixed colors.

tsx
<SoftAurora
  color1="var(--color-chart-3)"
  color2="oklch(0.7 0.22 20)"
  brightness={1.2}
  className="absolute inset-0"
/>

Highlight Active

Pull up speed / scale / bandSpread to make the aurora denser, brighter and flow faster.

tsx
<SoftAurora
  speed={1.4}
  scale={2.4}
  brightness={1.3}
  bandSpread={1.4}
  className="absolute inset-0"
/>

Wallpaper level (overlay content)

Low speed, turn off mouse parallax, and use fallback to cover the title copy on the aurora, suitable for the main visual of landing pages.

tsx
<SoftAurora
  speed={0.3}
  bandHeight={0.35}
  enableMouseInteraction={false}
  className="absolute inset-0"
  fallback={
    <div className="flex h-full flex-col items-center justify-center gap-1">
      <p className="text-lg font-semibold text-white">Hulian Component Library</p>
      <p className="text-xs text-white/60">Soft light aurora · WebGL · token Coloring</p>
    </div>
  }
/>

When to Use

Use SoftAurora when a dark hero or spacious marketing surface needs slow color movement without a sharply defined focal object. It works behind large copy when brightness and band position are restrained. Choose DotPattern or GridPattern for regular geometry, or SideRays for directional beams from a corner.

Import

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

Props

NameTypeDefaultDescription
color1stringvar(--color-chart-1)Primary band color for the first layer; accepts any CSS color resolved through an off-screen canvas
color2stringvar(--color-chart-4)Secondary color for the offset layer; overlap between the layers creates mixed hues
speednumber0.6Animation-speed multiplier; 0.2-2 is recommended
scalenumber1.5Noise-sampling scale; higher values create finer texture, with 0.8-3 recommended
brightnessnumber1Overall brightness multiplier
noiseFrequencynumber2.5Base noise frequency, controlling fold density
noiseAmplitudenumber1Base noise amplitude, controlling vertical variation
bandHeightnumber0.5Vertical band position from 0 to 1; lower values move the band downward
bandSpreadnumber1Width and intensity of the glow surrounding each band
octaveDecaynumber0.1Contribution retained by higher-frequency noise octaves
layerOffsetnumber0Time-phase offset between the two layers; nonzero values separate their peaks
colorSpeednumber1Horizontal travel speed of the cosine color cycle
enableMouseInteractionbooleantrueEnable subtle pointer-driven parallax
mouseInfluencenumber0.25Distance the aurora shifts in response to the pointer
classNamestring-Class name forwarded to the root
styleCSSProperties-Inline styles forwarded to the root

Slots

SlotTypeDescription
fallbackReactNodeForeground content rendered above the static gradient when reduced motion is enabled

Usage Guidelines

  • SoftAurora does not add inset-0 itself. Position it explicitly, for example with absolute inset-0, inside a relative parent that has measurable dimensions and overflow-hidden.
  • During SSR, the live root has no canvas. After hydration, a canvas is appended before OGL import and scene setup; if either step fails, that uninitialized or blank canvas remains and SoftAurora does not switch to the reduced-motion fallback. Reduced motion instead keeps the root, replaces the canvas with token gradients, and renders fallback above that static layer.
  • color1 and color2 are parsed through an off-screen canvas. Use full theme variables such as var(--color-chart-1); bare values such as var(--primary) do not resolve. See [[hulian-token-color-var-needs-color-prefix]].
  • Pointer parallax is decorative and is disabled by fallback paths. Keep essential information in normal foreground content rather than encoding it in motion.

Related

DotPattern · GridPattern · StripedPattern · Spotlight · RetroGrid · Ripple

Playground

<div className="relative h-56 overflow-hidden rounded-xl"
     style={{ background: "oklch(0.14 0.02 255)" }}>
  <SoftAurora
    speed={0.6}
    scale={1.5}
    brightness={1}
    bandHeight={0.5}
    enableMouseInteraction={true}
    className="absolute inset-0"
  />
</div>
PreviousSideRaysDecorationNextSafari

On this page

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