Renders text as a particle mesh by sampling pixel data from an offscreen canvas. On mount, particles scatter outward then spring back to their home positions. Cursor proximity repels particles away, creating an interactive dissolution effect.
text-assembly-preview
Why it helps: Particle text creates a memorable, interactive hero element that draws attention. The physics-based repulsion gives a tactile feel that static text cannot match.
Also good to know:
// Loading source...
import { TextAssembly } from "./components/live/TextAssembly";
<TextAssembly
text="Your Name"
className="h-[42vh]"
font='"Inter", system-ui, sans-serif'
fontWeight={800}
sampleStep={3}
color="#ffffff"
/>The text string to render as particles.
Color of the particle dots.
Background color. Use 'transparent' for none.
Font family used to rasterize the text.
Font weight for the rasterized text.
Pixels between samples. Lower = denser mesh. 2-4 is the sweet spot.
Spring stiffness for particles returning home.
Velocity damping factor. Lower values slow particles faster.
Force applied to particles near the cursor.
Pixel radius around the cursor that repels particles.
How far particles start from home on mount, in px.
Additional CSS classes for the container div.
import { TextAssembly } from "./components/live/TextAssembly";
<TextAssembly
text="Your Name"
className="h-[42vh]"
font='"Inter", system-ui, sans-serif'
fontWeight={800}
sampleStep={3}
color="#ffffff"
/>