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.
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} />Read from the component's own type, so this cannot drift from what it accepts.
| Prop | Type | Default | Description |
|---|---|---|---|
before | string | — | Printed before the corrected word |
struck* | string | — | The word that gets struck through |
replacement* | string | — | The word that takes its place |
after | string | — | Printed after the corrected word |
as | "h1" | "h2" | "h3" | "p" | "span" | — | |
trigger | "view" | "mount" | — | |
delay | number | — | |
className | string | — | |
struckClassName | string | — | Classes for the struck word, e.g. a muted colour |