Modus UI

Nebula Orb

Web (React)

A volumetric gas nebula sealed in a glass sphere over a twinkling star field.

Billowing emission clouds inside a glass sphere, floating over a radial gradient and a twinkling dot-grid star field. It fills its positioned parent and freezes its animation when the user prefers reduced motion. Built on the shaders library (MIT) and rendered with WebGPU.

Nebula Orb

Installation

CLI

npx @modus-ui/cli add nebula-orb

Manual

  1. Install shaders with npm install shaders.
  2. Copy the code from the component tab.
  3. Create a file at components/ui/nebula-orb.tsx.
  4. Paste the code.

Usage

tsx
import { NebulaOrb } from "@/components/ui/nebula-orb";

export default function Example() {
  return (
    <div className="relative h-[500px] w-full overflow-hidden">
      <NebulaOrb />
      <div className="relative z-10 p-8">
        <h1>Content over the effect</h1>
      </div>
    </div>
  );
}

Props

PropTypeDefaultDescription
coreColorstring"#ffd9b0"Colour of the hot cores.
gasColorstring"#ff5e7a"Main gas colour.
veilColorstring"#3a5bdb"Colour of the outer veil.
backgroundColorstring"#05030f"Outer colour of the backdrop gradient.
speednumber1Gas animation speed.
densitynumber1Density of the gas.
glownumber1Glow of the cores.
radiusnumber0.38Radius of the sphere.

Comments

  • No comments yet.