Skip to content

Repository files navigation

Shared Element

Create smooth transition between individual DOM elements. Demo

Installation

<scriptsrc="https://unpkg.com/shared-element@1.0.0/dist/shared-element.umd.js"></script>

OR

yarn add shared-element
or
npm install shared-element

Usage

lettransition=newSharedElement({ from, to });transition.init(object);transition.reverse();

Config

Methods

Init


Properties - type: Object

KeyDefaultType
duration300number
easingeaseInOutQuintstring
withOverlaytrueboolean
delay0number

CSS


format: {property: [from, to]}

example

transition.css({borderRadius: ["2em",0],background: ["red","blue"]});

Points


example

transition.points({from: {top: 100,left: 400},to: {top: 10,left: 0}});

About

Create smooth transition between individual DOM elements.

Resources

Stars

4 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages