crucıble

Slag

Animated film-grain / noise overlay: fine, neutral-gray speckle that blends over any content via low opacity and mix-blend-mode, with an fps throttle for a slow, settled look and an optional warm tint knob.

canvasfree

Installation

CLI

npx shadcn@latest add @crucible/slag

Props

PropTypeDefaultDescription
grainSizenumber2.2Size of a single grain in device-independent px. Bigger = coarser dust.
opacitynumber0.09Overlay opacity, 0–1.
fpsnumber24Frames per second the grain regenerates at. Real film grain doesn't need 60fps churn; low values (e.g. 6) read as a "settled," smoldering particulate-air look.
warmthnumber0Amber tint strength on the brightest grains, 0–1. 0 keeps the grain pure neutral gray; raise it for a warm-biased dust.
dprnumber2devicePixelRatio ceiling.
pausedbooleanFreeze the grain at its current frame.
Also accepts all props of React.ComponentPropsWithoutRef<"div">they pass through to the underlying element.

Honors prefers-reduced-motion with a designed static fallback, pauses offscreen and on hidden tabs, and passes className through.