中文
Voice Mode
正在聆听…
Loading & status · Vanilla JS + CSS

Voice halo orb

语音呼吸光球

Breathe and gently rotate a layered radial-conic sphere to convey an active voice state.

Also searched as: 语音对话呼吸光球, AI 声波呼吸圆球, OpenAI 语音光球, Voice Orb

AI Markdown (.md)
Placement
Background, Button
Mood
Soft, Technical
Trigger
一直循环
Site types
工具和应用, 品牌官网, 个人网站

How it works & accessibility

Animates inner sphere scale between 1 and amplitude via smooth keyframes alongside a rotating conic halo ring, exposing setLevel() for live audio modulation while pausing motion under reduced motion.

Best for: Background, Button (一直循环).

Reduced motion: 关闭呼吸缩放与旋转循环,保留柔和清晰的光球视觉状态

Mobile & touch: 全部动画运行在合成层 scale 与 rotate 上,避免模糊滤镜重绘导致掉帧

Key parameters

ParameterKeyDefaultRangeNotes
呼吸周期duration3600ms——
呼吸倍率amplitude1.14倍——

Ready-to-paste AI prompt

Add “Voice halo orb” to the background in my project: Animates inner sphere scale between 1 and amplitude via smooth keyframes alongside a rotating conic halo ring, exposing setLevel() for live audio modulation while pausing motion under reduced motion.
Parameters: duration: 3600ms, amplitude: 1.14×.
Preserve existing content and layout. Respect prefers-reduced-motion by showing the final state. Content must remain visible if JavaScript fails or is disabled.
Reference: https://donglang.linter.top/effects/voice-orb.md (canonical specification and reference code).

Dependency-free reference code

CSS
.vo-orb {
  --vo-duration: 3600ms;
  --vo-amplitude: 1.14;
  --vo-level: 0;
  position: relative;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.vo-halo,
.vo-core {
  grid-area: 1 / 1;
  border-radius: 50%;
}

.vo-halo {
  width: 118%;
  height: 118%;
  background: conic-gradient(
    from 0deg,
    rgb(125 211 252 / 0.62),
    rgb(56 189 248 / 0.78),
    rgb(224 242 254 / 0.68),
    rgb(37 99 235 / 0.62),
    rgb(125 211 252 / 0.62)
  );
  opacity: calc(0.5 + var(--vo-level) * 0.35);
  filter: blur(11px);
  animation: vo-spin var(--vo-duration) linear infinite;
}

.vo-core {
  position: relative;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 36% 26%, rgb(255 255 255 / 0.98) 0%, rgb(186 230 253 / 0.85) 26%, transparent 56%),
    radial-gradient(circle at 66% 74%, rgb(29 78 216 / 0.95) 0%, rgb(14 116 244 / 0.9) 48%, rgb(125 211 252 / 0.88) 100%);
  box-shadow: inset 0 -10px 24px rgb(12 45 128 / 0.38), inset 0 2px 12px rgb(255 255 255 / 0.72), 0 0 32px rgb(56 189 248 / 0.45);
  animation: vo-breathe var(--vo-duration) ease-in-out infinite;
}

@keyframes vo-breathe {
  0%, 100% {
    scale: 1;
  }
  50% {
    scale: var(--vo-amplitude);
  }
}

@keyframes vo-spin {
  0% {
    rotate: 0deg;
  }
  100% {
    rotate: 360deg;
  }
}

@media (prefers-reduced-motion: reduce) {
  .vo-halo,
  .vo-core {
    animation: none;
  }
}
JavaScript
// 语音呼吸光球(Voice halo orb)· 原生 JS,不依赖任何库。
// 用法:const ctl = voiceOrb(root, { duration: 3600, amplitude: 1.14 });
// 返回 { setLevel(level /* 0–1 */), destroy() },可接实时音频能量调制外圈光晕。
export function voiceOrb(root, { duration = 3600, amplitude = 1.14 } = {}) {
  if (!root) return null;
  const prevDuration = root.style.getPropertyValue('--vo-duration');
  const prevAmplitude = root.style.getPropertyValue('--vo-amplitude');
  const prevLevel = root.style.getPropertyValue('--vo-level');

  root.classList.add('vo-orb');
  root.style.setProperty('--vo-duration', `${duration}ms`);
  root.style.setProperty('--vo-amplitude', String(amplitude));

  const setLevel = (level = 0) => {
    const clamped = Math.max(0, Math.min(1, Number(level) || 0));
    root.style.setProperty('--vo-level', clamped.toFixed(3));
  };

  return {
    setLevel,
    destroy() {
      if (prevDuration) root.style.setProperty('--vo-duration', prevDuration);
      else root.style.removeProperty('--vo-duration');
      if (prevAmplitude) root.style.setProperty('--vo-amplitude', prevAmplitude);
      else root.style.removeProperty('--vo-amplitude');
      if (prevLevel) root.style.setProperty('--vo-level', prevLevel);
      else root.style.removeProperty('--vo-level');
    },
  };
}
HTML
<div class="vo-orb" role="status" aria-label="AI 语音聆听中">
  <span class="vo-halo" aria-hidden="true"></span>
  <span class="vo-core" aria-hidden="true"></span>
</div>

More in Loading & status

Browse all 86 effects →

Shown once per release · Always available in changelog