Scramble

Soon

Headline letters resolve from a scramble of glyphs into the final words.

Text EffectsCSS-onlylightweightmobile-friendly

Code

Updates live with your settings.

Preparing the code…

How to use

  1. 1

    Add the files

    Copy the files from the Code section into a folder named drifting-dots/ in your project. They are plain TypeScript; the React wrapper is one file and the engine does not depend on it.

  2. 2

    Drop in the component

    Place <DriftingDots /> inside a positioned container with a size; it fills the container. Every setting is a prop, and changing a prop updates the running effect.

  3. 3

    Other frameworks

    Vue, Svelte, Astro or plain HTML: use the engine directly, or copy the AI Prompt and let your assistant write the wrapper for your stack. The prompt carries this exact code.

Props

PropTypeDefaultDescription
countnumber 0–30060How many dots.
sizenumber 1–12 px3Base dot radius.
blurnumber 0–8 px0Softens every dot.
colorstring (#hex)"#ffffff"Dot colour.
backgroundstring (#hex)"#0a0a0a"Painted behind the dots.
speednumber 0–4 x1Drift speed.

Performance

Bundle
~2 KB gzipped
Cost
Low
Renders on
CPU (Canvas 2D)
Reduced motion
Respected
  • Stand-in engine. The real one is on its way.

Related