103 Pro components and page blocks

Get Pro

Halftone Horizon

Preview

Customize

Color
top
Curve1.00
Reach1.00
Softness1.10
Spacing7.0px
Dot size1.00
Min dot0.25
Dots0.70
Speed1.0
Grain0.040
Seed0
Radius120px
Lens0.60
Trail length1.2s
Follow0.40

Installation

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

Usage

import { HalftoneHorizon } from "@/components/uibrik/halftone-horizon/halftone-horizon";​<HalftoneHorizon  color="#f0602a"  direction="top"  curve={1}  reach={1}  softness={1.1}  spacing={7}  dotSize={1}  minDot={0.25}  dots={0.7}  speed={1}  grain={0.04}  seed={0}  animate  interactive  radius={120}  lens={0.6}  trailLength={1.2}  ripples  follow={0.4}>  …</HalftoneHorizon>

Props

HalftoneHorizon
color
Type string
"#f0602a"
Colour of the sky between the dark and the light; drawn in shades of it.
colors
Type string[]
["#07060f","#231a5c","#6b3fc4","#e2609a","#ffc9a3","#fff8ef"]
Hex colours, 2 to 6, from the dark edge to the light one. Overrides color.
direction
Type "top" | "right" | "bottom" | "left"
"top"
Edge the dark comes from; the light gathers at the opposite one.
curve
Type number
1
How strongly the bands arch; 0 is nearly level.
reach
Type number
1
How far the dark reaches; 1 is the designed height.
softness
Type number
1.1
How gradual the bands are; higher spreads them over more of the frame.
spacing
Type number
7
Distance between dots.
dotSize
Type number
1
Dot size, as a share of the spacing; 1 lets the dots fuse just before the light.
minDot
Type number
0.25
Smallest dot (in the dark), as a share of a full one; 0 lets dark dots vanish.
dots
Type number
0.7
How far into the light the halftone reaches; past it the gradient is smooth.
speed
Type number
1
Animation speed; 1 is the designed pace.
grain
Type number
0.04
Film grain strength.
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: the dots bulge under it, its path prints a fading trail of dots, and a click sends out a ring.
radius
Type number
120
How far the pointer's light reaches.
lens
Type number
0.6
How strongly the dots bulge under the pointer, like a loupe; 0 turns it off.
trailLength
Type number
1.2
Seconds the pointer's trail takes to fade.
ripples
Type boolean
true
A click sends a ring of swollen dots out across the screen.
follow
Type number
0.4
How lazily the light 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.