Flicker

Twinkling square field with density fade and live controls.

A canvas grid of small squares that reseeds and twinkles. Anchor density to an edge, then tune size, gap, fade, and brightness.

Color
4px
6px
0.45
0.12
1.2
0.55
0.35
1
1
0.15
1
1.25
tsx
import { Flicker } from "@/components/motion/flicker"export function Example() {  return (    <Flicker      className="h-[420px] w-full"      squareSize={4}      gridGap={6}      color="#3b82f6"      maxOpacity={0.45}      flickerChance={0.12}      twinkleSpeed={1.2}      twinkleStrength={0.55}      minBrightness={0.35}      intensity={1}      opacity={1}      direction="right"      fadeStart={0.15}      fadeEnd={1}      falloff={1.25}    />  )}

Installation

npx @arctis-sh/@arctis-sh/ui@latest add flicker

Usage

import { Flicker } from "@/components/motion/flicker"
<Flicker  className="h-[420px] w-full"  direction="right"  color="#3b82f6"/>

API Reference

Flicker

PropTypeDefault
squareSizenumber4
gridGapnumber6
colorstring#3b82f6
backgroundColorstring—
maxOpacitynumber0.45
flickerChancenumber0.12
twinkleSpeednumber1.2
twinkleStrengthnumber0.55
minBrightnessnumber0.35
intensitynumber1
opacitynumber1
directionnone right left top bottomnone
fadeStartnumber0.15
fadeEndnumber1
falloffnumber1.25
dprnumber1.5
classNamestring—
childrenReactNode—

Also accepts the other native div attributes. Square size and gap are in pixels.