How to Use Shaders in React (2026 WebGPU / WebGL Tutorial)
<h2> We've got it easy, and that's a problem </h2> <p>It’s getting easier and easier to build for the frontend.</p> <p>Frameworks are better. Tooling is better. AI can generate entire UI layouts. You can spin up a clean, responsive, modern-looking site in a day. But that also means everyone else can too. As the barrier to building goes down, the bar for standing out goes up.</p> <p>The places where things still stand out tend to be motion, interactivity, and visuals — the parts that AI struggle with and that still feel a bit like magic. GPU-powered shaders are a big part of that next frontier.</p> <p><a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F9c5qcj3zpwv5
We've got it easy, and that's a problem
It’s getting easier and easier to build for the frontend.
Frameworks are better. Tooling is better. AI can generate entire UI layouts. You can spin up a clean, responsive, modern-looking site in a day. But that also means everyone else can too. As the barrier to building goes down, the bar for standing out goes up.
The places where things still stand out tend to be motion, interactivity, and visuals — the parts that AI struggle with and that still feel a bit like magic. GPU-powered shaders are a big part of that next frontier.
If you’ve ever seen effects like:
-
Liquid glass distortions
-
Dithering or ASCII renders
-
Interactive ripple/distortion backgrounds
-
Animated gradients that feel alive
...those are typically powered by fragment shader math running on the GPU (via WebGL or WebGPU). The problem is that shader programming is nothing like normal frontend work. You’re suddenly dealing with trigonometry, UV coordinates, noise functions, render passes, memory buffers, and a lot of concepts that feel very far removed from writing React components or CSS.
Shader magic for modern frontends
That’s the challenge that led me to build the Shaders component library — instead of writing GLSL or WGSL directly, you work with shader effects as components that you can drop into your app, pass props to, and compose together.
You can treat GPU effects more like UI building blocks:
-
Use them in hero sections
-
Use them as animated backgrounds
-
Wrap images or SVGs with effects
-
Add interactivity with mouse position
-
Animate values over time with props
No more context switching into heavy shader math or fighting AI over floating point math — you’re working at the same level you normally work at: components and props.
Creating shader effects in 10 minutes flat
Shaders is currently in public beta, and is already being used in a bunch of production projects. It's available for Vue, React, Svelte, Solid and vanilla JS.
Here’s a short video that walks through how to use the components inside a React project, explores some of the available presets, and shows how the design editor fits into your workflow.
If you want to try it yourself, you can find everything here:
Docs: https://shaders.com npm: https://www.npmjs.com/package/shaders
If you need help, or end up shipping something awesome using Shaders, let us know in Discord here: https://discord.gg/Mfqmb2jCQT
It’s never been easier to build for the web — which means it’s never been more important to build something that feels different 🔥
Sign in to highlight and annotate this article

Conversation starters
Daily AI Digest
Get the top 5 AI stories delivered to your inbox every morning.
More about
availableproductcomponentOrders of magnitude: use semitones, not decibels
I'm going to teach you a secret. It's a secret known to few, a secret way of using parts of your brain not meant for mathematics ... for mathematics. It's part of how I (sort of) do logarithms in my head. This is a nearly purposeless skill. What's the growth rate? What's the doubling time? How many orders of magnitude bigger is it? How many years at this rate until it's quintupled? All questions of ratios and scale. Scale... hmm. 'Wait', you're thinking, 'let me check the date...'. Indeed. But please, stay with me for the logarithms. Musical intervals as ratios, and God's joke If you're a music nerd like me, you'll know that an octave (abbreviated 8ve), the fundamental musical interval, represents a doubling of vibration frequency. So if A440 is at 440Hz, then 220Hz and 880Hz are also 'A'.

Maintaining Open Source in the AI Era
<p>I've been maintaining a handful of open source packages lately: <a href="https://pypi.org/project/mailview/" rel="noopener noreferrer">mailview</a>, <a href="https://pypi.org/project/mailjunky/" rel="noopener noreferrer">mailjunky</a> (in both Python and Ruby), and recently dusted off an old Ruby gem called <a href="https://rubygems.org/gems/tvdb_api/" rel="noopener noreferrer">tvdb_api</a>. The experience has been illuminating - not just about package management, but about how AI is changing open source development in ways I'm still processing.</p> <h2> The Packages </h2> <p><strong>mailview</strong> started because I missed <a href="https://github.com/ryanb/letter_opener" rel="noopener noreferrer">letter_opener</a> from the Ruby world. When you're developing a web application, you don

Kia’s compact EV3 is coming to the US this year, with 320 miles of range
At the New York International Auto Show on Wednesday, Kia announced that its compact electric SUV, the EV3, will be available in the US "in late 2026." The EV3 has been available overseas since 2024, when it launched in South Korea and Europe. The 2027 model coming to the US appears to have the same […]
Knowledge Map
Connected Articles — Knowledge Graph
This article is connected to other articles through shared AI topics and tags.
More in Products

I Built 5 SaaS Products in 7 Days Using AI
<p>From zero to five live SaaS products in one week. Here is what I learned, what broke, and what I would do differently.</p> <h2> The Challenge </h2> <p>I wanted to test: can one developer, armed with Claude and Next.js, ship real products in a week?</p> <p>The answer: yes, but with caveats.</p> <h2> The 5 Products </h2> <ol> <li> <strong>AccessiScan</strong> (fixmyweb.dev) - WCAG accessibility scanner, 201 checks</li> <li> <strong>CaptureAPI</strong> (captureapi.dev) - Screenshot + PDF generation API</li> <li> <strong>CompliPilot</strong> (complipilot.dev) - EU AI Act compliance scanner</li> <li> <strong>ChurnGuard</strong> (paymentrescue.dev) - Failed payment recovery</li> <li> <strong>DocuMint</strong> (parseflow.dev) - PDF to JSON parsing API</li> </ol> <p>All built with Next.js, Type

Stop Accepting BGP Routes on Trust Alone: Deploy RPKI ROV on IOS-XE and IOS XR Today
<p>If you run BGP in production and you're not validating route origins with RPKI, you're accepting every prefix announcement on trust alone. That's the equivalent of letting anyone walk into your data center and plug into a switch because they said they work there.</p> <p>BGP RPKI Route Origin Validation (ROV) is the mechanism that changes this. With 500K+ ROAs published globally, mature validator software, and RFC 9774 formally deprecating AS_SET, there's no technical barrier left. Here's how to deploy it on Cisco IOS-XE and IOS XR.</p> <h2> How RPKI ROV Actually Works </h2> <p>RPKI (Resource Public Key Infrastructure) cryptographically binds IP prefixes to the autonomous systems authorized to originate them. Three components make it work:</p> <p><strong>Route Origin Authorizations (ROAs

Claude Code's Source Didn't Leak. It Was Already Public for Years.
<p>I build a JavaScript obfuscation tool (<a href="https://afterpack.dev" rel="noopener noreferrer">AfterPack</a>), so when the Claude Code "leak" hit <a href="https://venturebeat.com/technology/claude-codes-source-code-appears-to-have-leaked-heres-what-we-know" rel="noopener noreferrer">VentureBeat</a>, <a href="https://fortune.com/2026/03/31/anthropic-source-code-claude-code-data-leak-second-security-lapse-days-after-accidentally-revealing-mythos/" rel="noopener noreferrer">Fortune</a>, and <a href="https://www.theregister.com/2026/03/31/anthropic_claude_code_source_code/" rel="noopener noreferrer">The Register</a> this week, I did what felt obvious — I analyzed the supposedly leaked code to see what was actually protected.</p> <p>I <a href="https://afterpack.dev/blog/claude-code-source-

DeepSource vs Coverity: Static Analysis Compared
<h2> Quick Verdict </h2> <p><a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb5unb078gtfj88nul328.png" class="article-body-image-wrapper"><img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fb5unb078gtfj88nul328.png" alt="DeepSource screenshot" width="800" height="500"></a><br> <a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fiz6sa3w0uupusjbwaufr.png" class="article-body-image-wrapper"><img src="https://med

Discussion
Sign in to join the discussion
No comments yet — be the first to share your thoughts!