Noise Texture
newA static SVG film-grain overlay for flat fills and gradients.
Version 3.0
A token sheet you can read in one sitting
Installation
npx shadcn@latest add @blank/noise-textureUsage
import { NoiseTexture } from "@/components/ui/noise-texture"<div className="relative overflow-hidden bg-card">
<NoiseTexture />
</div>Grain breaks up the banding a soft gradient shows on large screens. It is a
single feTurbulence filter with no image to load and nothing to animate, so
it has no motion settings. The overlay is stronger in dark mode, where grain
on dark fills is harder to see.
Props
| Prop | Type | Default |
|---|---|---|
frequency | number | 0.4 |
octaves | number | 6 |
slope | number | 0.15 |
noiseOpacity | number | 0.6 |