jingrow/components/common/TypeWriter.jsx
2025-06-17 15:23:37 +08:00

19 lines
425 B
JavaScript

"use client";
import React from "react";
import { TypeAnimation } from "react-type-animation";
const demoStrings = [
"customer satisfaction",
"business needs",
"creative ideas",
];
export default function TypeWriter({ strings = demoStrings }) {
return (
<TypeAnimation
sequence={[...strings.flatMap((element) => [element, 2000])]}
wrapper="span"
speed={50}
repeat={Infinity}
/>
);
}