Toggle Sidebar B
AppearanceLight & dark mode D

Particle Text

Text assembles from drifting particles that scatter and reform on demand.

Default

Move the pointer over the text to push particles away. Pick Hover or Click as the trigger to replay the gather.

Dark previewReplay previewOpen in new tab
Future Interfaces

Customize

Trigger
Weight
Color
Highlight
Particle Size2.2px
Density4
Scatter190px
Gather1600ms
Stagger420ms
Repel Strength42
Repel Radius120px
Idle Drift0.8px

API Reference

ParticleText

PropTypeDefaultDescription
textstring"UI Library"The words sampled into particle targets.
particleSizenumber2Rendered size of each particle in CSS pixels.
densitynumber4Pixel sampling step for the offscreen glyph canvas. Lower values create more particles.
colorstring"#ffffff"Primary particle color.
highlightColorstring"#8b5cf6"Secondary color blended through the particle field.
scatternumber180How far particles begin from their final glyph targets.
gatherDurationnumber1600Milliseconds for particles to converge into the text.
staggernumber420Maximum per-particle delay in milliseconds before gathering.
pointerRepelnumber40Strength of the cursor pushback.
repelRadiusnumber120Cursor influence radius in pixels.
idleDriftnumber0.7Subtle resting motion after the text has formed.
trigger"mount" | "hover" | "click""mount"How the scatter-and-reform sequence can replay after the first formation.
fontSizenumber | string"clamp(3rem, 12vw, 8rem)"Canvas text size used for glyph sampling.
fontWeightnumber | string800Font weight used for sampling.
fontFamilystring"inherit"Font family used for sampling. Inherit waits for the surrounding font before sampling.
glowbooleantrueAdds a soft particle bloom in the highlight color.

Accessibility

Keyboard shortcuts and ARIA behavior.

  • The text is drawn on a canvas, so the wrapper carries an aria-label and a visually hidden copy of the text for screen readers.
  • With prefers-reduced-motion the particles skip the scatter and sit on the text.