DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to add an animated WebGPU background to a web page with Shaders

Drop a gradient with a cursor trail into a React, Vue, Svelte, or Solid page using the Shader component.

Short answer: Run npm install shaders in your project; then import Shader, LinearGradient, and CursorTrail from 'shaders/react' (or the matching framework path such as 'shaders/vue'); Nest LinearGradient and CursorTrail as children of Shader, then set props such as colorA and colorB on the gradient. All steps.

  • Top pick
  • Content
  • Intermediate
  • 30 minutes
  • From the README
  • Any agent

Who it is forA front-end developer building a landing page who wants a modern animated background without writing shader code.

The problemWriting a GPU effect from scratch takes shader expertise and time that a marketing page rarely justifies.

The outcomeA page background that renders a live gradient and reacts to the cursor, built from ready-made components.

What you need first

  • Node.js and npm to install the shaders package
  • A project using React, Vue, Svelte, Solid, or plain JavaScript
  • A browser with WebGPU support for the effects to render
  • A free shaders.com account if you want to use the design editor or CLI sync

Steps

  1. Run npm install shaders in your project.
  2. Import Shader, LinearGradient, and CursorTrail from 'shaders/react' (or the matching framework path such as 'shaders/vue').
  3. Nest LinearGradient and CursorTrail as children of Shader, then set props such as colorA and colorB on the gradient.
  4. Start your project's dev server and open the page in a WebGPU-capable browser to confirm the effect renders. (inferred, check the README)

Prompt for your agent

In the shader-effects-inc/shaders repo, install the shaders package in <project-path> and add a Shader element with a LinearGradient and a CursorTrail as the page background for the framework used in <project-path>. Expected output: the edited component file and a short list of changed files. Verify that the import path matches the project's framework.

Caveat. The effects need a browser with WebGPU support, so check the target audience's browsers before relying on the background.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for shader-effects-inc/shaders and "Add an animated WebGPU background to a web page"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer