Browse components
Grain Gradient
A slowly morphing mesh gradient of four colors under a layer of moving film grain.
Grain Gradient
Installation
npx shadcn@latest add @glint-ui/grain-gradientFirst time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glint-ui-seven.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
| Prop | Type | Default | Description |
|---|---|---|---|
| colors | string[] | ["#ff6a3d","#c026d3","#4338ca","#0c0a1f"] | Three or four mesh colors. |
| speed | number | 1 | Morph speed. |
| grain | number | 0.5 | Film grain strength. |
| warp | number | 1 | How much the colors swirl. |
| className | string | — | Extra classes for the root element. |