Skip to content

    Browse components

    Grain Gradient

    A slowly morphing mesh gradient of four colors under a layer of moving film grain.

    Grain Gradient

    Open
    Customize

    Installation

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

    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/grain-gradient.json

    Usage

    import { GrainGradient } from "@/components/ui/grain-gradient";
    
    <div className="relative h-96">
      <GrainGradient grain={0.5} />
    </div>

    Props

    PropTypeDefaultDescription
    colorsstring[]["#ff6a3d","#c026d3","#4338ca","#0c0a1f"]Three or four mesh colors.
    speednumber1Morph speed.
    grainnumber0.5Film grain strength.
    warpnumber1How much the colors swirl.
    classNamestring—Extra classes for the root element.