React Noise Background
Film grain texture that makes digital interfaces feel organic and authentic. Build cinematic React background components with canvas rendering, CSS blend modes, animated patterns, and TypeScript support for Next.js applications with shadcn/ui.
Powered by
Adding texture to digital designs?
Join our Discord community for help from other developers.
Perfect digital is boring. Too clean, too sterile, too obviously computer-generated. Real materials have texture—film grain, paper fibers, canvas weave. This React component adds organic noise patterns that make your interfaces feel authentic, like they exist in the physical world instead of floating in digital space.
Organic grain textures
Watch animated grain patterns add life and authenticity to digital surfaces:
Built for React applications with TypeScript and Next.js. Uses HTML5 Canvas with requestAnimationFrame
for smooth grain animation. CSS blend modes (overlay, multiply, screen) integrate the texture naturally with your content. Perfect for photography sites, creative portfolios, or any design that needs to feel less digital.
Installation
npx shadcn@latest add https://www.shadcn.io/registry/noise.json
npx shadcn@latest add https://www.shadcn.io/registry/noise.json
pnpm dlx shadcn@latest add https://www.shadcn.io/registry/noise.json
bunx shadcn@latest add https://www.shadcn.io/registry/noise.json
Usage
import { Noise } from "@/components/ui/noise";
export default function FilmPortfolio() {
return (
<div className="relative h-screen bg-black">
{/* Your content */}
<div className="relative z-10 flex items-center justify-center h-full">
<h1 className="text-6xl font-bold text-white">
Authentic Photography
</h1>
</div>
{/* Film grain overlay */}
<div className="absolute inset-0 mix-blend-overlay">
<Noise
patternSize={100}
patternScaleX={1}
patternScaleY={1}
patternRefreshInterval={2}
patternAlpha={25}
/>
</div>
</div>
);
}
Why most texture effects look fake
Most developers use static PNG overlays or CSS background-image patterns. It's lifeless—the same pattern repeated forever, obviously tiled. Others try JavaScript particle systems that eat CPU generating "random" dots. Some use CSS filters like blur() and contrast(), but it looks like a Instagram filter from 2012.
This React component generates real grain using Canvas with Math.random()
for each pixel. The pattern refreshes every few frames, creating that living, breathing texture of real film grain. CSS blend modes integrate it naturally—overlay for subtle texture, multiply for darker grain, screen for lighter effects. It's the difference between authentic film grain and a digital filter.
Features
- Canvas-based grain generation using pixel-level randomization for authentic texture
- Animated pattern refresh with configurable intervals for living, breathing grain
- CSS blend mode integration supporting overlay, multiply, screen, and other creative effects
- Independent scale control with separate X/Y scaling for directional grain effects
- Precision opacity control using 0-255 alpha values for subtle to dramatic texture
- High-performance rendering using requestAnimationFrame and optimized canvas operations
- Responsive container adaptation automatically adjusting to window and container changes
- TypeScript definitions for all grain parameters and visual customizations
- Memory efficient implementation preventing performance degradation over time
- shadcn/ui compatible with proper layering and blend mode support
Examples
Pattern Variations
Explore different grain types from fine film grain to coarse texture:
API Reference
Noise
Main component for canvas-based animated grain texture effects.
Prop | Type | Default | Description |
---|---|---|---|
patternSize | number | 250 | Base resolution of grain pattern in pixels |
patternScaleX | number | 1 | Horizontal stretch factor for directional grain |
patternScaleY | number | 1 | Vertical stretch factor for directional grain |
patternRefreshInterval | number | 2 | Animation frames between pattern updates (1-100) |
patternAlpha | number | 15 | Grain opacity (0-255, recommend 10-40 for subtlety) |
className | string | - | Additional CSS classes for container styling |
Grain Pattern Guidelines
// Subtle film grain (most common)
patternSize={100} patternAlpha={20} patternRefreshInterval={3}
// Fine detail grain
patternSize={50} patternAlpha={15} patternRefreshInterval={1}
// Heavy texture grain
patternSize={200} patternAlpha={40} patternRefreshInterval={5}
// Static texture (no animation)
patternSize={150} patternAlpha={25} patternRefreshInterval={1000}
CSS Blend Mode Effects
mix-blend-overlay
- Natural film grain integration (most popular)mix-blend-multiply
- Darker grain that deepens colorsmix-blend-screen
- Lighter grain that brightens highlightsmix-blend-soft-light
- Gentle contrast enhancementmix-blend-hard-light
- Dramatic contrast and texture
Common gotchas
Blend mode browser support: Most blend modes work everywhere, but some older browsers might not support all variants. overlay
and multiply
are the safest options.
Performance with large patterns: Very large patternSize
values (500+) can impact performance. The canvas has to generate more pixels. Stick to 50-300 for best balance.
Alpha value confusion: patternAlpha
uses 0-255 scale, not 0-1 like CSS opacity. Values above 50 often look too heavy. 10-30 is the sweet spot for subtle grain.
Refresh interval timing: Lower values = faster animation but higher CPU usage. Very fast refresh (interval: 1) can cause performance issues on older devices.
Z-index layering conflicts: Noise typically goes on top with blend modes. If your content disappears, check z-index values and blend mode compatibility.
Canvas sizing edge cases: The canvas adapts to container size. Very small containers might not show grain effectively. Minimum 100px recommended.
You might also like
Explore other texture and atmospheric background components for React applications:
Flickering Grid
Subtle grid squares that flicker like old CRT static
Particles
Floating particle systems with physics-based movement
Ethereal Shadow
Atmospheric shadows that breathe and distort organically
Aurora
Northern lights effects with flowing gradient animations
Gradient Animation
Flowing orb gradients with color mixing and movement
Sparkles
Magical sparkle effects with random positioning patterns
Questions developers actually ask
React Meteors Background
Shooting star animations that make interfaces feel cosmic and dynamic. Build mesmerizing React particle background components with CSS gradients, randomized timing, customizable density, and TypeScript support for Next.js applications with shadcn/ui.
React Particles Background
Interactive particle systems that respond to mouse movement like magnetic fields. Build dynamic React background components with canvas rendering, physics simulation, customizable behavior, and TypeScript support for Next.js applications with shadcn/ui.