Black Friday: 30% off Pro

Get 30% off

Updated

Halftone

Preview

Customize

Colors
Background
Spacing7.0px
Dot size0.95
Min dot0.30
Angle0°
Frequency1.30
Flow1.20
Band width1.00
Contrast1.10
Glow0.50
Softness0.00
Fade0.00
edges
Speed1.0
Seed0
Radius70px
Trail strength0.85
Trail length0.90s
Follow0.55

Installation

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

Too large to paste whole, so Copy prompt gives a short prompt that installs it with the CLI. Download the full prompt to attach it instead.

Usage

import { Halftone } from "@/components/uibrik/halftone/halftone";​<Halftone  colors={["#1b2533", "#5c7a9a", "#c9d6e0", "#f6ecdc"]}  background="#050608"  spacing={7}  dotSize={0.95}  minDot={0.3}  angle={0}  frequency={1.3}  flow={1.2}  bandWidth={1}  contrast={1.1}  glow={0.5}  softness={0}  fade={0}  fadeFrom="edges"  speed={1}  seed={0}  animate  interactive  radius={70}  trailStrength={0.85}  trailLength={0.9}  follow={0.55}>  …</Halftone>

Where to use Halftone

  • Print-inspired backgrounds

    Swirling ribbons drawn by dot size give a page a newspaper or poster feel.

    Pairs with Dither Gradient

  • Music and event pages

    Lit dots in motion suit gig posters, festivals and album sites.

  • Agency heroes

    A graphic, high-contrast pattern fits studios with a bold visual identity.

Props

Halftone
colors
Type string[]
["#1b2533","#5c7a9a","#c9d6e0","#f6ecdc"]
Dot colours from dim to bright, blended in OKLCH; 2 to 6.
background
Type string
"#050608"
Colour behind the dots.
spacing
Type number
7
Distance between dots.
dotSize
Type number
0.95
Largest dot, as a share of the spacing; 1 lets the brightest dots touch.
minDot
Type number
0.3
Smallest dot (in the dark), as a share of the largest; 0 lets dark dots vanish.
angle
Type number
0
Grid angle.
frequency
Type number
1.3
Size of the ribbons of light; higher is busier.
flow
Type number
1.2
How much the ribbons curl.
bandWidth
Type number
1
Thickness of the ribbons.
contrast
Type number
1.1
Higher gives darker darks and fuller lights.
glow
Type number
0.5
Light spilling around the brightest dots.
softness
Type number
0
Blur on each dot's edge.
fade
Type number
0
How much the dots fade out toward the chosen side.
fadeFrom
Type "edges" | "top" | "bottom" | "left" | "right"
"edges"
Where the dots fade out.
speed
Type number
1
Animation speed; 1 is the designed pace.
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.
interactive
Type boolean
true
React to the pointer.
radius
Type number
70
Width of the pointer trail.
trailStrength
Type number
0.85
How strongly the trail lights the dots.
trailLength
Type number
0.9
Seconds the trail takes to fade.
follow
Type number
0.55
How lazily the trail follows the pointer, 0 (locked) to 1 (drifts after it).
children
Type ReactNode
–
Content shown on top of the background.
className
Type string
–
Classes for the box; it fills whatever size you give it.