Particle Word

Particle Word

A word sampled into thousands of ink particles that spring-assemble on mount, drift with organic noise, and scatter away from the cursor.

Installation

▸ Run the following command

npx shadcn@latest add https://www.mellowui.com/r/particle-word.json

▸ Or install manually

  1. Copy the source from the Code tab above.
  2. Place it at components/mellow/particle-word.tsx
  3. Import and use.

API Reference

PropTypeDefaultDescription
textstringThe word or short phrase to assemble from particles.
fontFamilystringFont family for the sampled glyphs. Defaults to the --font-serif token.
fontStyle"normal" | "italic""italic"Font style used when sampling the word.
fontWeightnumber | string400Font weight used when sampling the word.
colorstringParticle color. Defaults to a themed ink that flips with dark/light mode.
densitynumberSample step in px — lower is denser. Defaults to 2 below 700px width, 3 above.
repelRadiusnumber140Radius in px of the cursor repel field.
repelStrengthnumber2.4How hard particles scatter away from the cursor.
classNamestringAdditional CSS classes for the wrapper.