GitHub
Translate

Opens Google Translate in a new tab. Website translation availability varies by region. Details

WebGL2 & DOM Animation Library • v0.1.5

Add motion without building a visual effects engine.

FluxFX provides production-oriented WebGL shaders and DOM interactions for HTML, React, Next.js, and Astro. It includes adaptive resolution, viewport pausing, WebGL context budgeting, automatic cleanup, performance controls, and reduced-motion support. It can present AI-generated visual assets, but does not generate content or call AI models.

For coding agents: LLM documentation index · full documentation context · FluxFX integration skill.

One library • 11 built-in effects

Build memorable interfaces while FluxFX handles the runtime lifecycle.

Add one data-fx attribute or use a React component. FluxFX handles mounting, resizing, visibility, context limits, animation lifecycle, and cleanup.

Choose your integration

Use the same effect engine from your preferred framework or deployment environment.

What is FluxFX?

FluxFX is a lightweight plugin engine that manages 8 WebGL2 GPU effects:

It also includes 3 DOM interactions:

All effects share one engine lifecycle. WebGL backdrops can be combined with palettes and Additive Color Blending to create consistent visual surfaces.

How FluxFX elevates web design

FluxFX is built for developers and designers who need expressive visual behavior without writing an entire rendering system.

Living depth

Combine spotlight, aurora, depth-carousel, and tilt-3d to create editorial depth instead of a flat decorative background.

Controlled color

Use theme-aware luminance detection, transparent surfaces, and Additive Color Blending while keeping headlines and interface content readable.

Tactile interfaces

Add magnetic pull to primary actions or pointer tilt to cards without loading a separate 3D or interaction library.

Framework-neutral setup

Use HTML attributes for static sites or typed components and hooks for React and Next.js applications.

Production performance and safety

The engine protects the page with lifecycle and resource-management features that would otherwise need to be implemented per effect.

No main-thread rendering loop

Supported WebGL effects can render inside an OffscreenCanvas worker so interface interactions and scrolling remain responsive.

Four-tier performance protection

DynamicResolution and PerformanceGuard can lower DPR, frame rate, shader resolution, and FBO size on slower devices.

WebGL context budgeting

Active contexts are limited to reduce browser crashes. Off-screen canvases can be replaced by lightweight CSS fallbacks.

Lifecycle-aware cleanup

Effects pause outside the viewport, respect reduced-motion settings, support React cleanup, and can be updated without losing contexts.

Use one clear focal point Avoid stacking many high-cost simulations in the same viewport. Prefer one WebGL hero effect and one or two lightweight DOM interactions.

Quick start

Choose your framework below. The HTML and CDN option requires no build step.

<section
  data-fx="aurora"
  data-fx-speed="1.0"
  data-fx-quality="high"
  style="min-height: 60vh;"
>
  <h1>Hello FluxFX</h1>
</section>

<script src="https://unpkg.com/@votax572002/fluxfx/dist/fluxfx.min.js"></script>
'use client';

import {
  Aurora,
  TiltCard,
  Magnetic,
} from '@votax572002/fluxfx/react';

export function Hero() {
  return (
    <Aurora
      style={{
        minHeight: '60vh',
        padding: '3rem',
      }}
    >
      <TiltCard maxTilt={10}>
        <h2>Interactive Card</h2>
      </TiltCard>

      <Magnetic strength={0.35}>
        <button type="button">
          Get Started
        </button>
      </Magnetic>
    </Aurora>
  );
}
'use client';

import {
  Aurora,
  TiltCard,
} from '@votax572002/fluxfx/react';

export default function HomePage() {
  return (
    <main>
      <Aurora
        device="desktop"
        style={{
          minHeight: '65vh',
          padding: '3rem',
        }}
      >
        <TiltCard
          maxTilt={10}
          disableOnMobile
        >
          <h1>Next.js + FluxFX</h1>
        </TiltCard>
      </Aurora>
    </main>
  );
}
<!-- src/pages/index.astro -->
<section
  data-fx="aurora"
  data-fx-device="all"
  data-fx-quality="high"
  style="min-height: 60vh;"
>
  <h1>Astro + FluxFX</h1>
</section>

<script>
  import { FluxFX } from '@votax572002/fluxfx';

  function initializeFluxFX() {
    FluxFX.init();
  }

  initializeFluxFX();
  document.addEventListener('astro:page-load', initializeFluxFX);
</script>
import { FluxFX } from '@votax572002/fluxfx';

// Initialize all elements containing [data-fx]
FluxFX.init();

// Or mount an effect imperatively
const destroy = FluxFX.apply(
  document.querySelector('#hero'),
  'prism-3d',
  {
    shape: 'torus',
    quality: 'high',
    colors: [
      '#6366f1',
      '#06b6d4',
      '#f472b6',
    ],
  }
);

// Remove the effect when the component unmounts
destroy();

Explore all effects

Every effect includes a live playground, implementation examples, options, use cases, performance guidance, and troubleshooting notes.

Browse the complete Effects Directory →