@matteodicristofalo/text-animations 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -5,11 +5,11 @@ This library provides a set of React components to animate text
|
|
|
5
5
|
# Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
npm install @
|
|
8
|
+
npm install @matteodicristofalo/text-animations
|
|
9
9
|
# or
|
|
10
|
-
yarn add @
|
|
10
|
+
yarn add @matteodicristofalo/text-animations
|
|
11
11
|
# or
|
|
12
|
-
pnpm add @
|
|
12
|
+
pnpm add @matteodicristofalo/text-animations
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
# Usage
|
|
@@ -22,7 +22,7 @@ The following example is for a Next.js App but you can apply the same concept fo
|
|
|
22
22
|
// app/layout.tsx
|
|
23
23
|
|
|
24
24
|
...
|
|
25
|
-
import "@
|
|
25
|
+
import "@matteodicristofalo/text-animations/index.css";
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
export default function RootLayout({
|
|
@@ -47,7 +47,7 @@ Once imported the CSS you can use the React components.
|
|
|
47
47
|
```js
|
|
48
48
|
"use client";
|
|
49
49
|
|
|
50
|
-
import { SplitTextRevel } from "@
|
|
50
|
+
import { SplitTextRevel } from "@matteodicristofalo/text-animations";
|
|
51
51
|
|
|
52
52
|
export function MyComponent() {
|
|
53
53
|
return (
|
|
@@ -77,7 +77,7 @@ You can also configure the reveal animation by specifying:
|
|
|
77
77
|
"use client";
|
|
78
78
|
|
|
79
79
|
import { useMemo } from "react";
|
|
80
|
-
import { SplitTextRevel } from "@
|
|
80
|
+
import { SplitTextRevel } from "@matteodicristofalo/text-animations";
|
|
81
81
|
|
|
82
82
|
export function MyComponent() {
|
|
83
83
|
const revealOptions = useMemo(
|
|
@@ -101,7 +101,7 @@ export function MyComponent() {
|
|
|
101
101
|
```js
|
|
102
102
|
"use client";
|
|
103
103
|
|
|
104
|
-
import { SplitTextRotate } from "@
|
|
104
|
+
import { SplitTextRotate } from "@matteodicristofalo/text-animations";
|
|
105
105
|
|
|
106
106
|
export function MyComponent() {
|
|
107
107
|
return (
|
|
@@ -118,7 +118,7 @@ Also here you can configure the aniimation
|
|
|
118
118
|
"use client";
|
|
119
119
|
|
|
120
120
|
import { useMemo } from "react";
|
|
121
|
-
import { SplitTextRotate } from "@
|
|
121
|
+
import { SplitTextRotate } from "@matteodicristofalo/text-animations";
|
|
122
122
|
|
|
123
123
|
export function MyComponent() {
|
|
124
124
|
const rotateOptions = useMemo(
|