81 Pro components and page blocks

Get Pro

Voronoi Cells

New

Preview

Customize

Color
Cell size72px
Edge2.00px
Bevel5.0px
Glow1.00
Fade0.45
Pulse1.00
Motion1.00
Speed1.0
Grain0.020

Installation

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

Usage

import { VoronoiCells } from "@/components/uibrik/voronoi-cells/voronoi-cells";​<VoronoiCells  color="#4f63ff"  cellSize={72}  edge={2}  bevel={5}  glow={1}  fade={0.45}  waves  pulse={1}  motion={1}  speed={1}  grain={0.02}  animate  interactive>  …</VoronoiCells>

Props

VoronoiCells
color
Type string
"#4f63ff"
Colour of the cells; drawn in shades of it.
colors
Type string[]
["#6a3df0","#2f8cff","#14b8a6","#e0479e"]
Hex colours, 2 to 6, spread across the field in drifting patches. Overrides color.
cellSize
Type number
72
Cell size.
edge
Type number
2
Width of the groove between cells.
bevel
Type number
5
Width of each cell's bevelled rim; 0 is flat.
glow
Type number
1
How far light from a lit cell's grooves spreads over it; 0 turns the glow off.
fade
Type number
0.45
How far the cells fade toward the edges; 0 keeps them even.
waves
Type boolean
true
Send waves sweeping across the cells now and then; off leaves only the pointer and clicks.
pulse
Type number
1
Strength of the waves that sweep across the cells; 0 turns them off.
motion
Type number
1
How far each cell's point wanders; 0 holds the pattern still.
speed
Type number
1
Animation speed; 1 is the designed pace.
grain
Type number
0.02
Film grain strength.
animate
Type boolean
true
Move on its own. Off draws one still frame.
interactive
Type boolean
true
Light the cells under the pointer; a click sends a ring.
children
Type ReactNode
–
Content shown on top of the background.
className
Type string
–
Classes for the box; it fills whatever size you give it.