Create smooth transition between individual DOM elements.
npm install shared-elementhtml
`
$3
`bash
yarn add shared-element
or
npm install shared-element
`
Usage
`javascript
let transition = new SharedElement({ from, to });
transition.init(object);
transition.reverse();
`
Config
$3
- play
- reverse
- css
- init
- points
#### Init
---
Properties - type: Object
| Key | Default | Type |
| ------------- | -------------- | --------- |
| duration | 300 | number |
| easing | easeInOutQuint | string |
| withOverlay | true | boolean |
| delay | 0 | number |
#### CSS
---
format: {property: [from, to]}
example
`javascript
transition.css({
borderRadius: ["2em", 0],
background: ["red", "blue"]
});
`
#### Points
---
example
`javascript
transition.points({
from: {
top: 100,
left: 400
},
to: {
top: 10,
left: 0
}
});
``