You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`glyphfx.js` plugin is a lightweight, CSS-only enhancement script that brings **letter-by-letter, word-by-word, and line-by-line** animations to your projects. It's designed to work seamlessly with [cssanimation](https://cssanimation.io), for robust and customizable text effects.
12
+
**AnimText**is a lightweight JavaScript enhancer for animating text with **letter-by-letter, word-by-word, and line-by-line** animations to your projects. It's designed to work seamlessly with [{css}animation](https://github.com/yesiamrocks/cssanimation), for robust and customizable text effects.
13
13
14
14
## Key Features
15
15
@@ -20,106 +20,118 @@
20
20
- Random & Reverse Effects: Get creative with animation order.
21
21
- Smart Handling: Safely handles whitespace and provides animation class fallbacks.
22
22
23
-
## Letter Animation Installation
23
+
## Installation
24
24
25
25
### Via NPM
26
26
27
27
```bash
28
-
npm install glyphfx
28
+
npm install animtext
29
29
```
30
30
31
-
For plain HTML, include the `glyphfx.js`, plugin just before your closing `</body>` tag:
31
+
For plain HTML, include the `animtext.js`, plugin just before your closing `</body>` tag:
@@ -128,69 +140,72 @@ You don't need to add `gf__separator` for `<br>` or newlines, this is the **defa
128
140
129
141
[Check out this Text & Letter Animations Preview Tool to easily generate the animation code for your text.](https://yesiamrocks.github.io/cssanimation/text-animation.html)
130
142
131
-
## `gf__delay` in Detail
143
+
## `data-at-delay` in Detail
132
144
133
-
The `gf__delay` attribute specifies the delay before each animated unit (letter, word, or line) begins its animation. The values are in milliseconds (ms).
145
+
The `data-at-delay` attribute specifies the delay before each animated unit (letter, word, or line) begins its animation. The values are in milliseconds (ms).
134
146
135
147
**Single Value:** If you provide a single value, that delay will be applied to every unit.
**Multiple Values:** This is where it gets powerful! You can provide multiple space-separated values. These values will be applied sequentially to each unit. If you provide fewer delay values than there are units, the last delay value will repeat for the remaining units.
This allows you to create rhythmic or staggered entry effects easily, like `gf__delay="50 100 100"` as in your example. The first unit gets 50ms delay, and all subsequent units get 100ms delay.
163
+
This allows you to create rhythmic or staggered entry effects easily, like `data-at-delay="50 100 100"` as in your example. The first unit gets 50ms delay, and all subsequent units get 100ms delay.
152
164
153
-
## `gf__base-duration` in Detail
165
+
## `data-at-base-duration` in Detail
154
166
155
-
The `gf__base-duration` attribute provides a simple way to set a global default animation duration for all units (letters, words, or lines) in milliseconds (ms).
167
+
The `data-at-base-duration` attribute provides a simple way to set a global default animation duration for all units (letters, words, or lines) in milliseconds (ms).
156
168
157
169
This value is used to explicitly set the duration for all units, overriding any `animation-duration` or `transition-duration` that might be detected from the CSS classes applied to the element.
@@ -201,6 +216,6 @@ This means `gf__base-duration` gives you a convenient way to set a project-wide
201
216
- You can provide fewer classes or delay values than units; the last value will simply repeat for the remaining units, making it easy to apply a pattern.
202
217
- If you pass more classes or values than needed, the extra elements are skipped, and a warning might be logged to your console to help with debugging.
203
218
- Delay and duration values are parsed safely; non-numeric strings will fall back to default behaviors to prevent errors.
204
-
- Animation duration is determined in this order of precedence: `gf__base-duration` > CSS-detected duration > internal default.
219
+
- Animation duration is determined in this order of precedence: `data-at-base-duration` > CSS-detected duration > internal default.
Copy file name to clipboardExpand all lines: dist/animtext.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
1
/*!
2
-
* glyphfx.js
3
-
* Title: glyphfx
2
+
* animtext.js
3
+
* Title: animtext
4
4
* Description: A lightweight JavaScript utility to split text into letters with animation-ready wrappers. Perfect for GSAP, cssanimation, or any custom animation workflow.
Copy file name to clipboardExpand all lines: dist/animtext.module.js
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
1
/*!
2
-
* glyphfx.js
3
-
* Title: glyphfx
2
+
* animtext.js
3
+
* Title: animtext
4
4
* Description: A lightweight JavaScript utility to split text into letters with animation-ready wrappers. Perfect for GSAP, cssanimation, or any custom animation workflow.
0 commit comments