uibrik

Grain Gradient

Preview

Customize

Colors
Scale1.00
Warp1.00
Sheen0.60
Angle30°
Sweep0.70
Vignette0.50
Speed1.0
Grain0.080
Grain size1.0px
Seed0

Usage

import { GrainGradient } from "@/components/uibrik/grain-gradient/grain-gradient";

<GrainGradient />

Installation

npx shadcn@latest add https://uibrik.com/r/grain-gradient.json
Adds the files to components/uibrik/grain-gradient. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/grain-gradient.

Props

GrainGradient
colors
Type string[]
["#07142e","#123a7c","#2b6bd6","#7db4f2","#dcebfc"]
Hex colours, 2 to 6, laid out from first to last across the flow.
scale
Type number
1
Size of the shapes; larger is calmer.
warp
Type number
1
How much the flow folds into itself.
sheen
Type number
0.6
Soft light on the folds.
angle
Type number
30
Direction the colours run; 0 is left to right.
sweep
Type number
0.7
How far apart the first and last colours sit; 0 mixes them all evenly.
vignette
Type number
0.5
Darkening toward the corners.
speed
Type number
1
Animation speed; 1 is the designed pace.
grain
Type number
0.08
Film grain strength.
grainSize
Type number
1
Size of a grain speck.
seed
Type number
0
Shifts the composition, so two backgrounds with the same settings still differ.
animate
Type boolean
true
Move on its own. Off draws one still frame.
children
Type ReactNode
–
Content shown on top of the background.
className
Type string
–
Classes for the box; it fills whatever size you give it.