Skip to content

    Browse components

    Film Grain

    An animated film-grain overlay. Pre-baked canvas frames, so it costs almost nothing to run.

    Open
    Customize
    normal
    overlay
    soft-light
    screen
    multiply

    Installation

    npx shadcn@latest add @glint-ui/film-grain

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/film-grain.json

    Usage

    import { FilmGrain } from "@/components/ui/film-grain";
    
    <div className="relative">
      {/* content */}
      <FilmGrain opacity={0.14} />
    </div>

    Props

    PropTypeDefaultDescription
    opacitynumber0.14Grain opacity.
    sizenumber1.5Grain size in px.
    refreshRatenumber24Grain frames per second (0 = static).
    blendMode"normal" | "overlay" | "soft-light" | "screen" | "multiply""normal"Blend mode against the content below.
    classNamestring—Extra classes for the root element.