# Sal

This library allows developers to enhance their web applications with smooth scroll animations that trigger as elements come into view.

[Website](https://mciastek.github.io/sal) [GitHub](https://github.com/mciastek/sal) [npm](https://npmjs.com/package/sal.js)

Sal is a performance-focused, lightweight scroll animation library that makes it easy to add dynamic animations to your web elements as they enter the viewport. With a minimal package size of less than 2.8 kb, it operates without any dependencies, ensuring a streamlined user experience.

Built using the Intersection Observer API, Sal efficiently detects when elements are visible on the screen and triggers animations accordingly. This API allows for optimal performance, significantly reducing the overhead associated with monitoring scroll events.

Integration is simple: by adding a `data-sal` attribute to HTML elements, developers can specify the desired animation effect. Options such as duration, delay, and easing can be customized using additional data attributes or CSS variables, giving complete control over the animation behavior. Supported animations include effects like fade, slide, zoom, and flip, among others.

Sal also provides advanced features, allowing for options to be modified after initialization, enabling responsiveness and adaptability based on user interaction. It includes support for event listeners to handle when elements enter or exit the viewport, making it suitable for interactive applications that require real-time feedback on user scrolling activity.

## Features

- Lightweight (less than 2.8 kb)
- No dependencies
- Scroll animations on visibility
- Based on Intersection Observer API
- Simple integration with HTML
- Supports multiple animation effects
- Customizable duration, delay, and easing options
- Events for entering and exiting viewport
- Supports CSS variables for custom properties
- Ability to reset and update options after initialization

## Details

**GitHub Stars**

3.6K

**NPM Downloads**

4.6K/week

**Latest Version**

0.8.5

**Created at**

Sep 27, 2017

**Updated at**

Nov 30, 2024

**License**

MIT License

Your ad here?

[Email us](mailto:hi@dennn.is?subject=Advertising%20on%20KickstartUI)

[Ad 680+ tools for your AI agents through one MCP server.](https://multitaskai.com/?ref=kickstartui)

## Related Items

### [Tailwind Motion](https://kickstartui.com/details/tailwind-motion/)

A new simple syntax animation library for enhancing UI with motion effects, focusing on performance and accessibility.

**GitHub Stars**

1.6K

**Updated at**

Dec 6, 2024

**License**

MIT License

### [anime.js](https://kickstartui.com/details/animejs/)

This animation library simplifies the process of creating engaging animations for web applications, combining flexibility with ease of use.

**GitHub Stars**

50.5K

**Updated at**

Dec 6, 2024

**License**

MIT License

### [GSAP](https://kickstartui.com/details/gsap/)

This animation tool allows you to effortlessly create engaging animations and interactions on the web, enhancing the user experience beyond standard transitions.

**GitHub Stars**

20.0K

**Updated at**

Dec 6, 2024

### [Motion One](https://kickstartui.com/details/motion-one/)

A modern web animation library built on native browser APIs, ensuring fast performance and tiny file size.

**GitHub Stars**

26.1K

**Updated at**

Dec 6, 2024

**License**

MIT License

### [React Spring](https://kickstartui.com/details/react-spring/)

This animation solution delivers smooth, high-performance transitions that breathe life into any interface, enhancing user experiences seamlessly.

**GitHub Stars**

28.3K

**Updated at**

Dec 6, 2024

**License**

MIT License

### [AutoAnimate](https://kickstartui.com/details/auto-animate/)

Enhance your web applications with captivating animations effortlessly.

**GitHub Stars**

12.9K

**Updated at**

Dec 6, 2024

**License**

MIT License

### [Framer Motion](https://kickstartui.com/details/framer-motion/)

A powerful tool to create impressive animations with minimal effort in your React applications.

**GitHub Stars**

26.1K

**Updated at**

Dec 6, 2024

**License**

MIT License

### [Glaze](https://kickstartui.com/details/glazejs/)

A utility-based animation framework built on GSAP for creating animations with minimal code.

**GitHub Stars**

414

**Updated at**

Dec 2, 2024

**License**

Other
