Creating custom transition or complex animation with Javascript π
π Self hosted -
| Name | Default | Description |
|---|---|---|
id |
unique | Id for clarifying/getting instance. |
timing |
linear | Default timing function. |
duration |
300 | Duration of the animation in millisecond. |
| Name | Description |
|---|---|
destroy |
destroy the transition instance |
Built-in timing functions
| Name | Description |
|---|---|
linear |
| Name | Description |
|---|---|
onUpdate:(self) => {} |
With custom timing function. You can find more timing functions here.
Smooth.create({
id: 'smooth', // string
timing: 'linear', // boolean (true), string, function
duration: 300, // number
destroyWhenCompleted: false, // boolean
customTimeFraction: undefined, // object {value: timeFraction}
onUpdate: (self) => {
}
});Run ./public in live server
npm run devBuild files from ./src to ./dist for production
npm run prodBuild files from ./src and ./dev to ./dist for deploying site
npm run build