Ballmac UI home

Noise Texture

A film-grain layer made from an SVG turbulence filter, with strength, fineness, blend mode and an optional shimmer, to take the plastic edge off gradients, cards and photos.

Edition 04

Grain makes it feel printed

Installation

$ pnpm dlx shadcn@latest add @ballmac/noise-texture

Usage

import { NoiseTexture } from "@/components/ballmac/noise-texture"

The full example is in the Code tab above.

Examples

Blend modes

overlay
soft-light
multiply
normal

API reference

PropTypeDefault
opacity

Strength of the grain, from 0 to 1.

number0.14
frequency

Fineness of the grain. Higher is finer.

number0.8
tile

Side of the repeating tile in pixels.

number220
blend

How the grain mixes with what is behind it. "overlay" adds grain to light and dark areas alike.

"overlay" | "soft-light" | "multiply" | "screen" | "normal""overlay"
animated

Make the grain shimmer like film.

booleanfalse

Also accepts the standard attributes of its root element.

Accessibility

KeyAction
Screen readersDecorative: aria-hidden and pointer-events-none
Reduced motionThe grain never shimmers

Use with AI

<NoiseTexture opacity frequency tile blend animated /> absolutely fills its relative parent. No image file is needed; the grain is an inline SVG data URI. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Noise Texture (@ballmac/noise-texture) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • Gradient heroes and cards that band or look flat
  • Giving imagery a printed feel

Not for

  • Text-heavy surfaces at high opacity

Registry JSON: https://ui.ballmac.com/r/noise-texture.json

Credits

Free to use in personal and commercial projects.

Registry
shadcn/utils