Strike and Replace

Notheard.

About this component

Strike and Replace

A sentence that corrects itself: a line is drawn through the old word from left to right, and the better word settles in beside it out of a soft blur.

Usage

The import and the props worth knowing about, in one place.

import { Text19 } from "@/components/beste/component/text19";

<Text19
  as="h2"
  before="Not"
  struck="fixed."
  replacement="heard."
  struckClassName="text-muted-foreground"
  className="font-serif text-6xl"
/>

<Text19 before="Slow" struck="change." replacement="change, on purpose." trigger="mount" delay={0.6} />

Props

Read from the component's own type, so this cannot drift from what it accepts.

PropTypeDefaultDescription
beforestring—Printed before the corrected word
struck*string—The word that gets struck through
replacement*string—The word that takes its place
afterstring—Printed after the corrected word
as"h1" | "h2" | "h3" | "p" | "span"—
trigger"view" | "mount"—
delaynumber—
classNamestring—
struckClassNamestring—Classes for the struck word, e.g. a muted colour

More Text components

View all Text
listened to the end

Roomtobreathe.