Fx Shader Kit
Shared WebGL shader background runtime for React with reduced motion and a CSS fallback.
Choose the primitives library your project already uses. Both look the same: your theme, not the variant, controls colors, shape, type and motion.
About this effect
What it's for
- Shared WebGL shader background runtime for React with reduced motion and a CSS fallback.
- Write my own fragment shader background component with the kit's canvas lifecycle and theme colours.
Includes
- Webgl runtime
- Fullscreen fragment shader
- Canvas lifecycle
- Dpr cap
- Resize observer
- Offscreen pause
- Hidden tab pause
- Context loss recovery
Works with
- Radix UI and Base UI primitives (pick the one your project uses)
- React 19 and Tailwind CSS 4 in Next.js (App Router), Vite, React Router or TanStack Start, installed with the agentic-ui or shadcn CLI
- Your theme tokens, in light and dark mode
Install
Included with Agentic UI Kit (one-time license). Install needs your license key: see pricing · connect your project.
Agentic UI CLI
agentic-ui add fx-shader-kitInstalls through shadcn and adapts the component to your design tokens.
shadcn CLI
npx shadcn@4.17.0 add @agentic-ui/fx-shader-kitUsed in
A standalone component: drop it into any screen.
- Type
- Effect
- Variants
- Radix UI and Base UI
- Themes
- Light and dark
- Widths
- Preview it at desktop, tablet and mobile widths above.
- npm packages
- None beyond your project's React and Next.js
- Registry dependencies
lib-motion- Files
14 files
- components/agentic-ui/fx-shader-kit/index.ts
- components/agentic-ui/fx-shader-kit/types.ts
- components/agentic-ui/fx-shader-kit/resolve.ts
- components/agentic-ui/fx-shader-kit/color.ts
- components/agentic-ui/fx-shader-kit/state.ts
- components/agentic-ui/fx-shader-kit/timing.ts
- components/agentic-ui/fx-shader-kit/uniforms.ts
- components/agentic-ui/fx-shader-kit/poster.ts
- components/agentic-ui/fx-shader-kit/glsl.ts
- components/agentic-ui/fx-shader-kit/shader-canvas.tsx
- components/agentic-ui/fx-shader-kit/use-shader-controller.ts
- components/agentic-ui/fx-shader-kit/use-resolved-colors.ts
- components/agentic-ui/fx-shader-kit/controller.ts
- components/agentic-ui/fx-shader-kit/gl.ts
Related components
Fx Aurora Background
Luminous aurora hero section on high-end SaaS landing page.
Details and live previewFx Background Patterns
Dot grid background with radial fade behind an AI chat landing hero.
Details and live previewFx Beam Border
Feature cards with an energetic travelling beam of light along the contour.
Details and live previewFx Beams Collision
Beams background where light beams fall and collide with the floor.
Details and live preview