useTypewriter
A hook that simulates typing of a string.
Usage
1 2 3 4 5 6 7
import useTypewriter from "@/hooks/use-typewriter"; export default function Example() { const value = useTypewriter("Hello, world!", 2000); return <div>{value}</div>; }
Installation
1
npx shadcn add "https://registry.niels.foo/use-typewriter.json"