Skip to content

Scan Text

A warm scanning light brings a dim headline into focus.

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 ScanText from "./ScanText";
export default function Example() {
return (
<ScanText
text={"Found in the light."}
color={"#f1d5ac"}
dimColor={"#857467"}
duration={4}
beamWidth={28}
paused={false}
/>
);
}

Using Scan Text

Supply a short headline through text and set fontSize through style. The text wraps normally, and only one copy is exposed to assistive technology.

Choose dimColor with enough contrast to keep the headline readable between passes. Reduced motion shows the illuminated text without scanning.

Props

NameTypeRequiredDefaultDescription
textstringNo""Text to render, with one accessible copy.
colorstringNo"#f1d5ac"Illuminated text colour.
dimColorstringNo"#857467"Base text colour beneath the scan.
durationnumberNo4Time in seconds for each direction of the scan.
beamWidthnumberNo28Spread of the light gradient.
pausedbooleanNofalsePause the scan at its current position.
classNamestringNo""Additional classes on the root element.
styleCSSPropertiesNoundefinedInline styles for 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.

Embossed Text

Text Effects

Sculpted metallic lettering catches the light as your pointer moves.