usal
Version:
Ultimate Scroll Animation Library - Lightweight, powerful, wonderfully simple âĻ
177 lines (125 loc) âĒ 7.55 kB
Markdown
<div align="center">

**Ultimate Scroll Animation Library - Lightweight, powerful, wonderfully simple âĻ**
**Works with React, Solid, Svelte, Vue, Lit, Angular, Vanilla JS and more**
**[> usal.dev/](https://usal.dev/)**
[](https://cloudflare.com)
[](https://jsdelivr.com)
[](https://npmjs.com/package/usal)
</div>
## âĻ Features
- ðŊ **40+ animations** (fade, zoom, flip with all directions)
- ð **Text animations** (split by word/letter)
- ðĒ **Number counters**
- ðĻ **Text effects** (shimmer, fluid)
- ðĶ **Only 8KB Gzipped**
- ð **Zero dependencies**
- âū **60fps performance**
- ðŠĪ **Web components supported**
- ð§ **Framework agnostic**
- ⥠**CDN powered** by jsDelivr & Cloudflare
## ðĶ Installation
### CDN (Quickstart)
```html
<script src="https://cdn.usal.dev/latest"></script>
```
### NPM
```bash
npm install usal
# Framework-specific packages
npm install @usal/react # For React/Next.js
npm install @usal/solid # For Solid/SolidStart
npm install @usal/svelte # For Svelte/SvelteKit
npm install @usal/vue # For Vue/Nuxt
npm install @usal/lit # For Lit
npm install @usal/angular # For Angular
```
## ð Framework Setup
### ⎠React (Next.js)
```jsx
import { USALProvider } from '@usal/react';
<USALProvider>{children}</USALProvider>;
```
### ðĶ Solid (SolidStart)
```jsx
import { USALProvider } from '@usal/solid';
<USALProvider>{props.children}</USALProvider>;
```
### ð§ Svelte (SvelteKit)
```js
import { usal } from '@usal/svelte';
// USAL auto-initializes globally
```
### ðĐ Vue (Nuxt)
```js
export default defineNuxtConfig({
modules: ['@usal/vue/nuxt']
```
### ðŠ Lit
```js
import { usal } from '@usal/lit';
// USAL auto-initializes globally
```
### ðĨ Angular
```js
import { USALModule } from '@usal/angular';
@Component({imports: [USALModule]})
export class AppComponent
```
## ð Basic Usage
```html
<!-- Simple animation -->
<div data-usal="fade-u">Fade from bottom</div>
<!-- With modifiers -->
<div data-usal="zoomin duration-800 delay-200">Zoom in</div>
<!-- Complex animation -->
<div data-usal="flip-r delay-500 blur once">Flip from right</div>
```
## [ð Complete API Documentation](https://github.com/italoalmeida0/usal/wiki/API-Documentation) or https://usal.dev/#api
## ðē Demos



## ð Packages Overview
| Package | Description | Version |
| --------------- | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |
| `usal` | Core library (Vanilla JS) |  |
| `@usal/react` | React integration |  |
| `@usal/solid` | Solid integration |  |
| `@usal/svelte` | Svelte integration |  |
| `@usal/vue` | Vue integration |  |
| `@usal/lit` | Lit integration |  |
| `@usal/angular` | Angular integration |  |
## ð JavaScript Animation Frameworks Comparison (2025)
### Performance & Size Comparison
| Framework | Bundle Size (gzip) | React | Vue | Angular | Svelte | Solid | Lit | Vanilla |
| -------------- | ------------------ | --------- | --------- | --------- | --------- | --------- | --------- | ------- |
| **ð USAL.js** | **~8KB** | â
Native | â
Native | â
Native | â
Native | â
Native | â
Native | â
|
| Motion One | Variable (~small) | â
| â
| â | â | â | â | â
|
| GSAP | ~28KB | â
| â
| â
| â
| â
| â
| â
|
| Anime.js v4 | ~27KB | â
| â
| â
| â
| â
| â
| â
|
| Lottie | ~60KB | â ïļ | â ïļ | â ïļ | â ïļ | â ïļ | â ïļ | â
|
| AOS | ~8KB | â ïļ | â ïļ | â ïļ | â | â | â | â
|
| SAL.js | ~2.7KB | â | â | â | â | â | â | â
|
### Feature Comparison
| Framework | Split (Letters/Words/Items) | Counters | Scroll Trigger | Timeline | SVG | Learning |
| ----------- | --------------------------- | --------- | -------------- | ----------- | --------- | ------------- |
| **USAL.js** | â
Core | â
Core | â
Core | â
Core | â | **Very Easy** |
| Motion | â | â | â
Core | â ïļ Variants | â
Core | Medium |
| GSAP | â ïļ Plugin | â ïļ Plugin | â
Plugin | â
Advanced | â ïļ Plugin | Complex |
| Anime.js v4 | â
Core | â
Core | â
Core | â
Core | â
Core | Medium |
| Lottie | â ïļ via AE | â ïļ via AE | â | â
Core | â
Core | Complex |
| AOS | â | â | â
Core | â | â | Very Easy |
| SAL.js | â | â | â
Core | â | â | Very Easy |
**Legend:**
- â
Native/Core support
- â ïļ Plugin/Wrapper required
- â Not supported
## ð Acknowledgments
USAL.js was inspired by:
- **[AOS.js](https://github.com/michalsnik/aos)** - Pioneering attribute-based animations
- **[SAL.js](https://github.com/mciastek/sal)** - Lightweight performance optimization
- **[Tailwind CSS](https://tailwindcss.com)** - Utility-first naming conventions
---
## ð License
MIT License ÂĐ 2025 Italo Almeida ([@italoalmeida0](https://github.com/italoalmeida0))