Particle Text
ComponentsParticle Text
TypographyNew

Particle Text

Scattered dots gather into a headline, then resolve into solid text.

USE IT FORProduct headlinesClosing calls to actionLaunch announcements
React + CSS
Explore the full-width experienceOpen preview

Build with

Anticraft.

Live component. Go ahead, interact.
01

Installation

Run this in your shadcn-configured React project. The component and stylesheet are added together.

TERMINAL
npx shadcn@latest add http://localhost:5173/r/particle-text.json

This command uses the current site address. For localhost, keep this preview running on the same computer. Files follow your configured components alias.

02

Usage

Import the component and make the details your own.

TypeScript
import { ParticleText, ParticleTextGrid } from '@/components/anticraft/ParticleText';

export function Example() {
  return (
    <ParticleTextGrid className="headline-panel">
      <ParticleText text="Anticraft." as="h2" duration={4.2} />
    </ParticleTextGrid>
  );
}
03

Props

PropTypeDefaultDescription
textstringRequiredThe headline. Explicit newline characters create multiple lines. Short phrases work best. The text remains in the HTML for accessibility and the no-canvas fallback.
as'h1' | 'h2' | 'h3' | 'p''h2'Semantic element for the real text. The decorative canvas is hidden from assistive technology.
durationnumber4.2Seconds for scatter, gathering, and the final solid-text dissolve. Clamped to 1–12; nonfinite values use the default.
fontSizenumber180Maximum font size in pixels, clamped to 24–320. Every line scales down to fit the container. Font family, weight, and color can be customized through CSS.
particleCountnumber3200Maximum sampled dots, clamped to 300–6000. Smaller text may use fewer particles.
pausedbooleanfalseExternal pause override. Preserves the reveal position and disables the internal motion toggle.
showControlsbooleantrueShows native Replay animation and Pause/Play motion controls. Replay restarts the reveal and respects the current pause state.
classNamestring''Additional root classes. The component uses the available width and inherits its font family and color.
ParticleTextGridComponent<ParticleTextGridProps>Optional wrapperExported from the same file. Wraps children in a recessed grid drifting left to right, with rounded hover cells and sparse idle highlights. Accepts children, paused, showControls (true), and className. Its separate Pause grid control stops the background. The --ac-particle-grid-surface and --ac-particle-grid-line CSS variables set its colors.
04

Motion & accessibility

Considered by default.

The reveal plays once when it enters the viewport. A cloud of dots gathers into the letter shapes, then dissolves into selectable HTML text. Replay starts it again. Pausing, hiding the document, or scrolling it offscreen stops its animation frame without skipping ahead. Reduced motion shows solid text immediately. Resizing preserves progress and rebuilds the sampled letters; an unavailable canvas falls back to naturally wrapping HTML text. The optional grid has its own pause control, preserves normal links and touch scrolling, and freezes for reduced motion, hidden documents and offscreen content.

Use semantic content and meaningful labels in your composition. Check contrast and keyboard behavior with your own styles and content.

05

Inspiration

A live study of the closing call to action: scattered particles form letters before resolving into solid text. Original implementation.

Visit Orgo

The linked site is the design or content reference. See the repository for demo artwork credits.