Skip to content

Disperse Text

Letters break formation on hover, then settle back into line.

LIVE PREVIEWInteract with the component
Just React. No extra dependencies.

Copy the component and its CSS module into your project.

CSS Modules

Usage

Matches your current playground settings.

jsx
import DisperseText from "./DisperseText";
export default function Example() {
return (
<DisperseText
text={"BREAK FORM"}
distance={22}
rotation={18}
duration={650}
color={"#ebdcca"}
style={{
"fontSize": 56
}}
/>
);
}

Using Disperse Text

Use a short word or phrase with room around it for the letters to separate. distance and rotation control the amount of movement.

Use active to coordinate the effect with another interaction. Reducing distance is a useful way to fit the effect into a tighter layout.

Props

NameTypeRequiredDefaultDescription
textstringNo""Text to scatter. Accessible text is announced once.
distancenumberNo25Maximum displacement in pixels.
rotationnumberNo18Maximum rotation in degrees.
durationnumberNo650Scatter and return transition duration in milliseconds.
colorstringNo"inherit"Text colour.
activebooleanNoundefinedOptional controlled scatter state; otherwise pointer hover or keyboard focus activates it.
classNamestringNo""Additional classes merged with component styles.
styleCSSPropertiesNoundefinedInline styles for caller-defined sizing, typography, and appearance.

Related components

Reflection Text

Text Effects

Crisp typography meets a soft, fading reflection beneath the baseline.

Morphing Words

Text Effects

Words dissolve through a soft blur while the headline keeps its width.

Dot Matrix Text

Text Effects

Amber pinpoints form a crisp matrix display with a soft travelling pulse.

Scan Text

Text Effects

A warm scanning light brings a dim headline into focus.