Morphing Ui transitions made simple
Magically animates one element into another just by tagging the first and last state.
npm install react-morph
# or
yarn add react-morphImport the useMorph hook.
const morph = useMorph(options);Then spread the props to the elements you want to morph.
Make sure you have just ONE element rendered at same time.
useMorph hook.{...morph}import React from 'react';
import { useMorph } from 'react-morph';() => {
// Handle toggle state as you normally would.
const [toggle, setToggle] = useState(true);
const morph = useMorph();
return (
);
};Please check the documentation.
No open issues yet, or sync has not completed.