Hardware-Accelerated Scroll Animations. Zero CSS Required.
Dom Flowt v3 completely replaces legacy CSS stylesheet dependencies with the Web Animations API (WAAPI). Declarative HTML attributes meet 60fps native performance in a lightweight 1.2kB library.
Interactive Preset Studio
Select keyframe presets, adjust timing, and test the WAAPI output live.
Animated Component
This DOM node is executed using the Web Animations API `element.animate()` with standard keyframes.
<div dom-flowt-is-visible="false" dom-flowt-type="fade" dom-flowt-duration="500" dom-flowt-repeat="repeat">
<!-- Your content here -->
</div>
Live Scroll Triggers
Scroll down to observe `dom-flowt` detecting elements entering viewport and executing WAAPI keyframe presets smoothly.
float-up
Smooth Y-axis translate upward with subtle opacity entry. Clean and modern for feature lists.
float-up-bounce
Adds an energetic dampening spring at the end of the float animation using 4-stage keyframe offsets.
pop-up
Combines vertical displacement with a scale transition from 90% to 100% full dimension.
float-right-bounce
Horizontal slide from left to right with a gentle bounce cushion effect upon arrival.
flip-horizontal
3D rotation along the Y-axis from 90 degrees to 0 degrees for impactful hero reveals.
jump
Playful multi-stage vertical jump with scale distortion mimicking physical squash and stretch.
Why Web Animations API (WAAPI)?
Version 3 transforms dom-flowt into a zero-CSS library. Here is how native WAAPI compares to legacy CSS stylesheets.
- Requires linking an external `.css` stylesheet or bundling global keyframes.
- Relies on class manipulation (`classList.add('dom-flowt-fade')`) and `animationend` listeners.
- Potential class name collisions with existing application CSS frameworks.
- Extra network requests to load stylesheets before DOM rendering completes.
- Zero CSS: Keyframes stored as pure JavaScript object presets.
- Compositor Thread Execution: `element.animate()` runs directly on the browser's GPU compositor.
- Dynamic Parameters: Durations, offsets, and timing functions configured programmatically per element.
- Single JS File: Drop `dom-flowt.js` into any app with zero bundler CSS plugin setups.
Documentation & API Reference
Complete usage guides, HTML data attributes, and JS API reference.
1. Installation
Include the single JS file in your HTML document via CDN or install via package managers. No CSS link tag is needed!
<!-- Include dom-flowt v3 in your head or before </body> -->
<script src="https://cdn.jsdelivr.net/npm/dom-flowt@3/dist/dom-flowt.min.js"></script>
<script>
// Initialize observer watching on DOM ready
document.addEventListener("DOMContentLoaded", () => {
DomFlowt.watch();
});
</script>
<!-- Basic fade in -->
<div dom-flowt-is-visible="false" dom-flowt-type="fade">
<h2>Fades in when scrolled into view</h2>
</div>
<!-- Float upward with custom bounce style & duration -->
<div dom-flowt-is-visible="false" dom-flowt-type="float" dom-flowt-style="up-bounce" dom-flowt-duration="800">
<p>Floats up with bounce elasticity over 800ms</p>
</div>