AnimatedOrb

pro

A decorative WebGL orb with transparent output and a static CSS fallback.

Installation

Add this component with the NateUI CLI.

npx nateui@latest add AnimatedOrb

Examples

Animation Duration

API

PropDescriptionTypeDefault
sizeOuter width and height in CSS pixels. Invalid or negative values use 100; zero disables drawing work.number100
scaleVisual scale, clamped to 0.1–3. The outer layout footprint remains unchanged.number1
colorsOrdered palette of 1–8 opaque CSS color literals. Empty or omitted arrays use the source palette. Invalid entries or more than eight colors use the whole default palette.readonly string[]['#e543fe', '#4cc2e9', '#000000']
glowIntensityGlow strength, clamped to 0–5.number1.45
colorSpreadColor spread into the ring interior, clamped to 0–4.number1.4
distortionRing wobble amount, clamped to 0–3.number0
highlightIntensityMoving highlight strength, clamped to 0–4.number1.4
animationDurationSource base-motion rate multiplier 25 / animationDuration; default 20 seconds corresponds to rate 1.25. Positive values below 0.1 are clamped. Non-positive and non-finite values stop base motion.number20
hoverStrengthHover response strength, clamped to 0–5.number0
hoverRotationRotate the orb while hovered or when hoverActive is set.booleanfalse
hoverActiveForce the hover response without pointer tracking.booleanfalse
followPointerTrack the pointer with the moving highlight.booleanfalse
pulseOnClickAdd independent local waves on pointer down; waves expire after 1.2 seconds and the active pool holds at most eight.booleantrue
animateOnMountPlay a short reveal when mounted.booleanfalse
opacityCanvas opacity, clamped to 0–1.number1
isPausedFreeze the current frame.booleanfalse
pixelRatioCanvas pixel ratio, clamped to 0.5–2. Invalid or non-positive values use the device ratio capped at 2.numberAutomatic
classNameAdditional class name on the outer element.string—
styleAdditional outer-element styles. size sets the final width and height.React.CSSProperties—

Palette entries must be opaque CSS colors supported by the browser. Alpha-bearing colors, currentColor, and unresolved var(...) values are rejected; pass resolved colors when a parent theme changes. The canvas retains source alpha and premultiplication. The Light branch uses an exterior coverage mask to keep its internal white lighting from painting the page background; the Dark branch retains the source transparency and glow. Normal startup does not show the CSS approximation; it appears only when WebGL2 is unavailable or its context is lost.

The orb is decorative and hidden from assistive technology. It does not capture focus or cancel pointer propagation. Reduced motion, document hiding, offscreen state, and isPaused suspend animation work. There are no hue, background-color, tilt, or trail controls.