Show the component; triggers when enter or exit states
Transitions
Chakra exports five components `Fade`, `ScaleFade`, `Slide`, `SlideFade` and `Collapse` to provide simple transitions.
Props#
The transition components extends the framer-motion.
Fade Props#
in
inbooleanunmountOnExit
unmountOnExitIf true, the element will unmount when `in={false}` and animation is done
booleanScaleFade Props#
in
inShow the component; triggers when enter or exit states
booleaninitialScale
initialScaleThe initial scale of the element
number0.95reverse
reverseIf true, the element will transition back to exit state
booleantrueunmountOnExit
unmountOnExitIf true, the element will unmount when `in={false}` and animation is done
booleanSlide Props#
direction
directionThe direction to slide from
SlideDirectionrightin
inShow the component; triggers when enter or exit states
booleanunmountOnExit
unmountOnExitIf true, the element will unmount when `in={false}` and animation is done
booleanSlideFade Props#
in
inShow the component; triggers when enter or exit states
booleanoffsetX
offsetXThe offset on the horizontal or x axis
string | number0offsetY
offsetYThe offset on the vertical or y axis
string | number8reverse
reverseIf true, the element will be transitioned back to the offset when it leaves.
Otherwise, it'll only fade out
booleantrueunmountOnExit
unmountOnExitIf true, the element will unmount when `in={false}` and animation is done
booleanCollapse Props#
animateOpacity
animateOpacityIf true, the opacity of the content will be animated
booleantrueendingHeight
endingHeightThe height you want the content in its expanded state.
string | numberautoin
inShow the component; triggers when enter or exit states
booleanstartingHeight
startingHeightThe height you want the content in its collapsed state.
string | number0unmountOnExit
unmountOnExitIf true, the element will unmount when `in={false}` and animation is done
booleanProps#
The transition components extends the framer-motion.
Fade Props#
in
inShow the component; triggers when enter or exit states
booleanunmountOnExit
unmountOnExitIf true, the element will unmount when `in={false}` and animation is done
booleanScaleFade Props#
in
inShow the component; triggers when enter or exit states
booleaninitialScale
initialScaleThe initial scale of the element
number0.95reverse
reverseIf true, the element will transition back to exit state
booleantrueunmountOnExit
unmountOnExitIf true, the element will unmount when `in={false}` and animation is done
booleanSlide Props#
direction
directionThe direction to slide from
SlideDirectionrightin
inShow the component; triggers when enter or exit states
booleanunmountOnExit
unmountOnExitIf true, the element will unmount when `in={false}` and animation is done
booleanSlideFade Props#
in
inShow the component; triggers when enter or exit states
booleanoffsetX
offsetXThe offset on the horizontal or x axis
string | number0offsetY
offsetYThe offset on the vertical or y axis
string | number8reverse
reverseIf true, the element will be transitioned back to the offset when it leaves.
Otherwise, it'll only fade out
booleantrueunmountOnExit
unmountOnExitIf true, the element will unmount when `in={false}` and animation is done
booleanCollapse Props#
animateOpacity
animateOpacityIf true, the opacity of the content will be animated
booleantrueendingHeight
endingHeightThe height you want the content in its expanded state.
string | numberautoin
inShow the component; triggers when enter or exit states
booleanstartingHeight
startingHeightThe height you want the content in its collapsed state.
string | number0unmountOnExit
unmountOnExitIf true, the element will unmount when `in={false}` and animation is done
boolean