MountTransition#

This component extends motion.div component of framer-motion. It provides one additional prop: animationType.

Use this prop to do basic animations:

  • fade (default)
  • scale
  • slide up
  • slide down
  • slide left
  • slide right

All other motion.div props are present, but some have default values. See below.

Example#

import { AnimatePresence } from 'framer-motion';
import { MountTransition } from 'la-danze-ui';
function App({ isVisible }) {
return (
<AnimatePresence>
{isVisible && (
<MountTransition
animationType="slideLeft"
/>
)}
</AnimatePresence>
);
}

Props#

Extends motion.div props

Additional props:

NameTypeDefaultRequiredDescription
animationType'fade'
|'scale'
|'slideUp'
|'slideDown'
|'slideLeft'
|'slideRight'
'fade'NoAnimation type of the div. Overrides variants prop.

Original motion.div props default values:

NameTypeDefaultRequiredDescription
initialTarget
|VariantLabels
|boolean
'initial'NoSee framer-motion doc.
animateAnimationControls
|TargetAndTransition
|VariantLabels
|boolean
'in'NoSee framer-motion doc.
exitTargetAndTransition | VariantLabels'out'NoSee framer-motion doc.
transitionTransition{ duration: 0.225 }NoSee framer-motion doc.
variantsVariantsNoSee framer-motion doc.
styleMotionStyleNoSee framer-motion doc. Overridden by animationType prop.