lightmotion-core
v0.1.1
Published
Lightweight, declarative animation library for modern web applications
Maintainers
Readme
LightMotion Core
LightMotion is a lightweight, declarative animation library for modern web applications. It allows you to add beautiful animations to your website with minimal JavaScript and simple HTML attributes.
Features
- 🚀 Ultra-lightweight (under 5KB gzipped)
- ⚡ Hardware-accelerated animations
- 📱 Mobile-friendly
- 🎨 Simple, declarative API
- 🔄 Built-in scroll-triggered animations
- 🎭 Multiple animation types and presets
Installation
npm install lightmotion-core
# or
yarn add lightmotion-core
# or include via CDN
<script src="https://unpkg.com/lightmotion-core/dist/lightmotion.min.js"></script>Basic Usage
- Add the
data-lightmotionattribute to any HTML element:
<div data-lightmotion="fade">This will fade in</div>- Customize with additional attributes:
<div
data-lightmotion="slide"
data-duration="1"
data-delay="0.5"
data-ease="ease-out"
>
This will slide in with a delay
</div>Available Animations
Basic Animations
fade- Fade in/outslide- Slide in from direction (usedata-direction)scale- Scale up/downrotate- Rotate elementskew- Skew element
Advanced Features
- Scroll-triggered animations
- Staggered animations
- Custom easing
- Callback support
- And more!
Documentation
For full documentation, please visit LightMotion Documentation.
Browser Support
LightMotion works in all modern browsers including:
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
- iOS Safari (latest)
- Android Chrome (latest)
License
MIT
