textmixer
v2.1.4
Published
A simple React component that generates scramble text
Downloads
15
Maintainers
Readme
TextMixer
A simple React component that generates scramble text animations using GSAP. Perfect for headings, buttons, or any text that needs a cool animated effect.
Features
- Scramble text animation with GSAP.
- Customizable duration, characters, and speed.
- Easy to integrate into any React project.
- Lightweight and fully reusable.
Installation
npm install textmixer
or with Yarn:
bash
Copy code
yarn add textmixer
Usage
jsx
Copy code
import React from "react";
import { TextScramble } from "textmixer";
function App() {
return (
<div>
<TextScramble
scrambleText="Hello World!"
duration={3}
chars="abc123!@#"
speed={0.5}
/>
</div>
);
}
export default App;
Props
Prop Name Type Description
scrambleText string The text you want to display and animate.
duration number Duration of the animation in seconds.
chars string Characters to use for scrambling.
speed number Speed of the scrambling effect.
Example
jsx
Copy code
<TextScramble
scrambleText="React + GSAP"
duration={4}
chars="abcdefghijklmnopqrstuvwxyz1234567890!@#"
speed={0.8}
/>
Notes
Make sure GSAP is installed (it comes with the package as a dependency).
Works best with React 18+.
Lightweight and easy to use in any React project.
License
MIT © Sakib Fakir
yaml
Copy code
---
If you want, I can also **add a live GIF example** in the README to make it even more appealing and professional.
Do you want me to do that?