tiny-essentials
Version:
Collection of small, essential scripts designed to be used across various projects. These simple utilities are crafted for speed, ease of use, and versatility.
40 lines (28 loc) • 1.01 kB
Markdown
## ✨ New Features
### 🕺 `TinyHtml.animate()`
You can now apply animations using the Web Animations API on one or more TinyElements with:
```js
TinyHtml.animate(el, keyframes, options);
```
Or use the instance shortcut:
```js
el.animate(keyframes, options);
```
Supports both simple keyframe arrays and `PropertyIndexedKeyframes`.
Useful for declarative UI transitions without third-party libraries!
---
### 🎯 `TinyHtml.scrollToXY()`
A new method to **smoothly scroll** any element (or the window) to specific coordinates.
```js
TinyHtml.scrollToXY(el, {
targetX: 100,
targetY: 200,
duration: 500,
easing: 'easeInOutQuad',
onAnimation: ({ x, y, time, isComplete }) => { ... }
});
```
* 🧠 Supports custom duration and easing names from `TinyHtml.easings`.
* 🔁 Provides per-frame callback (`onAnimation`) with scroll position and progress.
* 💡 Works for `HTMLElement` and `window`.
**Full Changelog**: https://github.com/JasminDreasond/Tiny-Essentials/compare/1.17.0...1.17.1