Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
ksco-liquid-route
Advanced tools
``` npm i -D liquid-route ``` This is a collection of route element and animation objects based on [`element.animate`](https://developer.mozilla.org/en-US/docs/Web/API/Element/animate). Which will make it super easy for you to do animated routing.
npm i -D liquid-route
This is a collection of route element and animation objects based on element.animate
. Which will make it super easy for you to do animated routing.
This mainly consist of the following animation objects
liquid-route
is the route component which you would need to use in order animate between routes. It takes a prop named animator which is a animation object
import Router from 'preact-router';
import LiquidRoute, {FadeAnimation, PopAnimation} from 'liquid-route';
import 'liquid-route/style.css';
import Home from './Components/Home/Home.jsx';
.
.
.
return (
<Router>
<LiquidRoute animator={FadeAnimation} path="/" component={Home}/>
<LiquidRoute animator={PopAnimation} path="/profile" getComponent={()=>{
return System.import('./Components/Profile/Profile.jsx').then(module => module.default);
}}/>
<LiquidRoute animator={PopAnimation} path="/profile/:pid" getComponent={()=>{
return System.import('./Components/Profile/Profile.jsx').then(module => module.default);
}}/>
</Router>
);
Animator
object is a javascript object which exposes two methods
getEntryAnimation
- returns animation object used to play entry animation of a routegetExitAnimation
- returns animation object used to playexitentry animation of a routeBoth of the above ☝ methods return an object having the following properties
a. animation: array of animation object used to play the entry/exit effect
b. options: an object of options taken by element.animate
api.
While some basic animator objects come with the bundle, here is where the most of the transition inspiriation is drawn from.
Send PR if you wanna add new animators in the repo, happy to include 😊.
In order for the transitions to work, please declare all routes as liquid-route
.
P.S. Tried and tested most of the animations are easily doable with this route element.
FAQs
``` npm i -D liquid-route ``` This is a collection of route element and animation objects based on [`element.animate`](https://developer.mozilla.org/en-US/docs/Web/API/Element/animate). Which will make it super easy for you to do animated routing.
The npm package ksco-liquid-route receives a total of 1 weekly downloads. As such, ksco-liquid-route popularity was classified as not popular.
We found that ksco-liquid-route demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.