CrazyGLCrazyGLHomeExploreGitHubBrowse heroesLoading hero…← Back to gallery@crazygl/magnetic-logo

Magnetic Logo Field

An image-driven particle field. Drop in a logo and the particles drift around then snap into its silhouette in waves. Cursor magnetically pulls or repels the swarm. Sample by alpha, luminosity, or transparency.

ReactCanvasImageInteractiveFont#particles#logo#magnetic#input-driven#interactive#canvas#premium

Usage

import MagneticLogo from '@crazygl/hero-magnetic-logo';

export default function Hero() {
  return (
    <MagneticLogo
      logo="https://crazygl.com/samples/crazygl.svg"
      heading="Your logo, alive."
      sampleMode="alpha"
      cursorForce={1}
    />
  );
}

Inputs you can plug in

  • Logo — Transparent SVG (preferred) or PNG. The silhouette becomes the formation the particles snap into, and transparency gives the cleanest edges. JPGs work too — the background is auto-detected and dropped.

Notable controls

  • Sample by — How the image is read into the shape: alpha, bright pixels (luminosity), or dark pixels (inverse luminosity). Match it to your logo; the default suits dark marks on transparent backgrounds.
  • Cursor Force — Magnetic pull on the swarm. Positive attracts, negative repels; ±1 stays interactive without yanking the whole swarm, ±1.8 is dramatic.
  • Cycle Animation — When on, particles loop between free drift and logo formation; when off they stay locked to the mark so it never breaks. Pair with Cycle Period (3–20s) to pace the reveal.
  • Drift — Ambient motion when not locked. 0.3–0.5 reads as "alive"; above 1 the silhouette gets noisy.
  • Glow — How far each particle's halo spreads. 0.5–0.8 is the photogenic range; push past 1.5 for a soft nebula.
01 · Install the package

One command, zero config.

npm install @crazygl/hero-magnetic-logo
02 · Render the component

Import once, drop it in.

The component takes the same props you see in the live customizer on the right — every default ships poster-quality.

hero.tsx
import MagneticLogoField from '@crazygl/hero-magnetic-logo';

export default function Landing() {
  return (
    <MagneticLogoField />
  );
}
03 · Use it in a page

SSR-safe by default.

The wrapper renders static HTML on the server and only initialises the canvas after hydration, so search engines see your copy.

page.tsx
// app/page.tsx — works in SSR-first frameworks (Next, Remix, Astro, etc.)
'use client';

import MagneticLogoField from '@crazygl/hero-magnetic-logo';

export default function Page() {
  return (
    <section>
      <MagneticLogoField
        heading="Say hi."
        subheading="Your new hero."
      />
      <article>
        <h2>Welcome</h2>
        <p>Your content keeps its own voice below the hero.</p>
      </article>
    </section>
  );
}
You might also like

Similar heroes

Logo Sand Formation

Thousands of glowing sand grains drift on a warm desert current and re-form the supplied logo. Pointer movement scatters them in a Gaussian shockwave; springs and damping pull each grain back into the silhouette.

Magnetic Field Lines

Thousands of particles stream along smooth, divergence-free flow lines — a live visualisation of an invisible magnetic field. The pointer drops a new magnetic pole into the field; lines visibly bend, swirl, and repel around the cursor.

Magnetic Dot Cloud

Thousands of floating 3D points settle into a soft sphere of light. Wherever you point, a gravity well opens — nearby dots erupt radially outward from the sphere's centre, bulging the cloud like a living particle sculpture. A critically-damped spring eases every swell in and out; idle, the whole field drifts and turns.

Floating Neon Logo Sign

The logo becomes a 3D neon tube sign floating in a dark cinematic scene. Segments flicker on during boot, then settle into a gentle pulse. Smoke drifts behind; hovering brightens the tubes.

Thermal Logo

Your logo rendered as a live thermal-camera image — a flowing heat field clipped to the silhouette and mapped through a cold-to-white-hot gradient, with the cursor leaving a glowing heat trail that slowly cools.

Volumetric Beam Logo

Your logo floats inside a vertical museum-grade beam of light. Ray-marched volumetric cone reveals drifting dust around the brand, an emissive ring lights the logo, and a soft floor shadow grounds the scene. Premium SaaS / personal-branding / product-launch aesthetic.
Live customizer

Magnetic Logo Field

Logo ImagePNG or SVG with transparency works best. Larger images are downsampled.Sample byHow the logo image is converted to particle target positions.Threshold0.54Pixels above this value count as part of the shape.Density1.6How densely the logo is sampled — affects shape sharpness.Logo Size0.55Vertical Offset-0.18BackgroundTransparent backgroundDrop the backdrop so the particles sit on top of whatever is behind the hero.ParticlesAccentParticles2400Particle Size0.7Glow0.55How far each particle's halo spreads.Cycle AnimationWhen on, particles cycle between free drift and logo formation. When off, they stay locked to the logo.Logo Pull1Cursor Force1Positive = attract, negative = repel.Cursor Radius180Speed1Drift0.4Random ambient motion when not in logo formation.Heading FontInteractivityWhich input drives the hero — try Scroll if you want the page to drive motion.
CrazyGL · crazygl.comProgrammable hero sections for real websites.