Skip to content

Commit bdf125e

Browse files
committed
Add simple usage.
1 parent 47a9796 commit bdf125e

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,29 @@ or in your component
5252
import "react-mouse-trail/dist/index.css";
5353
```
5454

55+
Here's a revised version of the usage section:
56+
57+
## Usage
58+
59+
MouseTrail is simple to integrate:
60+
61+
```tsx
62+
import { MouseTrail } from "react-mouse-trail";
63+
64+
export default function Layout() {
65+
return (
66+
<html lang="en" suppressHydrationWarning>
67+
<body className={inter.className}>
68+
{/* ... */}
69+
<MouseTrail rgb={[1, 0, 0]} />
70+
</body>
71+
</html>
72+
);
73+
}
74+
```
75+
76+
By default, the RGB value `[1, 0, 0]` represents the color red.
77+
5578
![Repobeats](https://repobeats.axiom.co/api/embed/016960ad97aa7b1abbdd9a615f5ffeb08d869cb6.svg "Repobeats analytics image")
5679

5780
## License

0 commit comments

Comments
 (0)