Skip to main content

Global Configration

index.tsx
import ReactDOM from "react-dom/client";
import App from "./App.tsx";
import { ScrollingTextProvider } from "web-scrolling-text/react";
import "./index.css";

ReactDOM.createRoot(document.getElementById("root")).render(
<ScrollingTextProvider
options={{
interval: 3000,
animationDuration: 1000,
loop: true,
enterAnimation: "fadeIn",
exitAnimation: "fadeOut",
}}
>
<App />
</ScrollingTextProvider>
);
index.css
@keyframes fadeIn {
0% {
opacity: 0;
}
100% {
opacity: 1;
}
}
@keyframes fadeOut {
0% {
opacity: 1;
}
100% {
opacity: 0;
}
}
info

You can use predefined Animations, Check this.