@@ -34,6 +34,13 @@ fade fade-u fade-d fade-l fade-r
3434fade-ul fade-ur fade-dl fade-dr
3535```
3636
37+ #### Slide Animations
38+
39+ ```
40+ slide slide-u slide-d slide-l slide-r
41+ slide-ul slide-ur slide-dl slide-dr
42+ ```
43+
3744#### Zoom In Animations
3845
3946```
@@ -76,6 +83,7 @@ split-flip-{direction} // split-flip-d, split-flip-r
7683```
7784
7885#### Split Delay
86+
7987Control delay between split parts (milliseconds)
8088
8189```
@@ -84,13 +92,15 @@ split-delay-{value}-{stagger}
8492```
8593
8694** Stagger types:**
95+
8796- Default (by index): ` split-delay-50 `
8897- Linear: ` split-delay-50-linear `
8998- Center (X/Y axes): ` split-delay-50-center `
9099- Edges (X/Y axes): ` split-delay-50-edges `
91100- Random: ` split-delay-50-random `
92101
93102** Examples:**
103+
94104```
95105split-delay-30
96106split-delay-100-center
@@ -223,13 +233,12 @@ window.USAL.config({
223233 splitDelay: 30 , // Delay between split items (ms)
224234 easing: ' ease-out' , // CSS easing function
225235 blur: false , // Enable/disable blur effect (false, true, or numeric value in rem - default: 0.625rem when true)
226- loop: ' mirror' , // Default loop type (mirror, jump)
236+ loop: ' mirror' , // Default loop type (mirror, jump)
227237 },
228238 observersDelay: 50 , // Delay for observers (ms)
229239 once: false , // Run animation only once
230240});
231241
232-
233242// Get current configuration
234243const currentConfig = window .USAL .config ();
235244
@@ -250,7 +259,6 @@ window.USAL.config({
250259 direction: ' l' ,
251260 },
252261});
253-
254262```
255263
256264#### Control Methods
@@ -270,19 +278,20 @@ window.USAL.destroy();
270278// Get version
271279console .log (window .USAL .version );
272280```
281+
273282#### Blur Effect
274283
275284``` javascript
276285// Blur can be boolean or numeric value in rem
277286window .USAL .config ({
278287 defaults: {
279- blur: false , // No blur effect
288+ blur: false , // No blur effect
280289 // or
281- blur: true , // Default blur (0.625rem)
290+ blur: true , // Default blur (0.625rem)
282291 // or
283- blur: 2 , // Custom blur (2rem)
292+ blur: 2 , // Custom blur (2rem)
284293 // or
285- blur: 0.5 , // Custom blur (0.5rem)
294+ blur: 0.5 , // Custom blur (0.5rem)
286295 },
287296});
288297```
@@ -320,6 +329,7 @@ window.USAL.config({ defaults: { duration: 500 } })
320329<!-- Fixed ID (prevents re-animation) -->
321330<div data-usal =" fade-u" data-usal-id =" hero-section" >Fixed ID</div >
322331```
332+
323333# 🚀 Advanced Options
324334
325335#### Custom Timeline Animation
@@ -331,12 +341,14 @@ line-[{timeline}]
331341```
332342
333343** Timeline Syntax:**
344+
334345- Properties (case-insensitive): ` o ` (opacity), ` s/sx/sy/sz ` (scale), ` t/tx/ty/tz ` (translate), ` r/rx/ry/rz ` (rotate), ` b ` (blur), ` p ` (perspective)
335346- Values: ` + ` or ` - ` followed by number
336347- Keyframes: Use ` | ` to separate, with optional percentage prefix
337348- Formatting: Spaces and line breaks are allowed for better organization
338349
339350** Property Reference:**
351+
340352- ` o±value ` : Opacity (0-100, auto-clamped, divided by 100)
341353- ` s±value ` : Scale (X and Y axes)
342354- ` sx±value ` : ScaleX only
@@ -356,13 +368,15 @@ line-[{timeline}]
356368** ⚠️ Important Notes:**
357369
358370** Order Matters:** Transforms are applied in the order they appear
371+
359372``` html
360373<!-- Different results! -->
361374<div data-usal =" line-[r+45tx+50]" >Rotate then translate</div >
362375<div data-usal =" line-[tx+50r+45]" >Translate then rotate</div >
363376```
364377
365378** Avoid Conflicts:** Don't mix general and axis-specific properties
379+
366380``` html
367381<!-- ❌ Conflict: s and sx both affect X scale -->
368382<div data-usal =" line-[s+0.5sx+0.8]" >Conflicting scales</div >
@@ -372,6 +386,7 @@ line-[{timeline}]
372386```
373387
374388** Duplicate Properties:** Last value wins
389+
375390``` html
376391<!-- Final opacity will be 0.8 -->
377392<div data-usal =" line-[o+50o+80]" >Duplicate opacity</div >
@@ -383,28 +398,31 @@ line-[{timeline}]
383398** Keyframe Rules:**
384399
3854001 . ** No pipes:** Animates FROM specified value TO original state
401+
386402 ``` html
387403 <!-- 0%: opacity 0, 100%: original -->
388404 <div data-usal =" line-[o+0]" >Fade in</div >
389-
405+
390406 <!-- 0%: scale 0.3 (X and Y), 100%: original -->
391407 <div data-usal =" line-[s+0.3]" >Scale up</div >
392408 ```
393409
3944102 . ** One pipe:** Animates FROM original state TO specified value
411+
395412 ``` html
396413 <!-- 0%: original, 100%: opacity 0.2 -->
397414 <div data-usal =" line-[|o+20]" >Fade to 20%</div >
398-
415+
399416 <!-- With percentage: 0%: original, 60%: opacity 0.4, 100%: opacity 0.4 -->
400417 <div data-usal =" line-[|60o+40]" >Fade at 60%</div >
401418 ```
402419
4034203 . ** Multiple pipes (2+):** Multi-step animation with auto-copy behavior
421+
404422 ``` html
405- <!-- 0%: opacity 0.3 (copy of 40%), 40%: opacity 0.3, 100%: opacity 0.7 -->
406- <div data-usal =" line-[|40o+30|o+70]" >Two pipes</div >
407-
423+ <!-- 0%: opacity 0.3 (copy of 40%), 40%: opacity 0.3, 100%: opacity 0.7 -->
424+ <div data-usal =" line-[|40o+30|o+70]" >Two pipes</div >
425+
408426 <!-- 0%: opacity 0.1 (copy of 20%), 20%: opacity 0.1, 50%: opacity 0.6, 70%: opacity 0.8, 100%: opacity 0.8 (copy of 70%) -->
409427 <div data-usal =" line-[|20o+10|50o+60|70o+80]" >Multi-step fade</div >
410428 ```
@@ -413,21 +431,29 @@ line-[{timeline}]
413431
414432``` html
415433<!-- Multi-line formatting for readability -->
416- <div data-usal =" line-[
434+ <div
435+ data-usal =" line-[
417436 O+0 SX+0.2 SY+0.2 TX+70 |
418437 40 O+50 SX+0.8 SY+0.8 TX+35 |
419438 70 O+90 SX+0.95 SY+0.95 TX+5 |
420439 O+100 SX+1 SY+1 TX+0
421- ]" >Complex entrance (case-insensitive)</div >
440+ ]"
441+ >
442+ Complex entrance (case-insensitive)
443+ </div >
422444
423445<!-- 3D transformation with order consideration -->
424- <div data-usal =" line-[
446+ <div
447+ data-usal =" line-[
425448 p+100 rx+0 ry+0 sx+0.3 sy+0.3 |
426449 25 rx+90 sx+0.6 sy+0.6 |
427450 50 rx+180 ry+90 sx+1 sy+1 |
428451 75 rx+270 ry+180 |
429452 rx+360 ry+360
430- ]" >3D flip sequence</div >
453+ ]"
454+ >
455+ 3D flip sequence
456+ </div >
431457
432458<!-- Combine with other modifiers -->
433459<div data-usal =" line-[o+0s+0.5|50s+1.2|o+100s+1] duration-2000 easing-[cubic-bezier(0.4,0,0.2,1)]" >
@@ -450,28 +476,32 @@ Fine-tune standard animations with numeric parameters.
450476```
451477
452478** Default Values:**
479+
453480- ** Normal animations:**
454- - Fade/Zoom movement: 15%
455- - Zoom intensity: 15%
481+ - Fade/Zoom movement: 15%
482+ - Zoom intensity: 15%
456483- ** Split animations (word/letter):**
457- - Fade/Zoom movement: 50%
458- - Zoom intensity: 50%
484+ - Fade/Zoom movement: 50%
485+ - Zoom intensity: 50%
459486- ** Flip (both):**
460- - Angle: 90°
461- - Perspective: 25rem
487+ - Angle: 90°
488+ - Perspective: 25rem
462489
463490** Parameter Interpretation:**
464491
465492** Fade:** Controls movement distance
493+
466494- 1 value: ` fade-40 ` → 40% distance (default: 25%)
467495- 2 values: ` fade-30-60 ` → X: 30%, Y: 60%
468496
469497** Zoom:** Controls scale and movement
498+
470499- 1 value: ` zoomin-30 ` → 30% intensity (default: 25%)
471500- 2 values: ` zoomin-40-60 ` → movement: 40%, intensity: 60%
472501- 3 values: ` zoomin-30-50-80 ` → X: 30%, Y: 50%, intensity: 80%
473502
474503** Flip:** Controls rotation and 3D depth
504+
475505- 1 value: ` flip-120 ` → 120° angle (default: 90°)
476506- 2 values: ` flip-90-60 ` → angle: 90°, perspective: 60rem (default: 25rem)
477507
@@ -492,4 +522,4 @@ Fine-tune standard animations with numeric parameters.
492522<div data-usal =" flip" >Default 90° angle, 25rem perspective</div >
493523<div data-usal =" flip-180-50" >Full flip, deeper perspective</div >
494524<div data-usal =" flip-udlr-120-80" >Multi-direction flip, custom angle and perspective</div >
495- ```
525+ ```
0 commit comments