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
in
boolean
unmountOnExit
unmountOnExit
If true
, the element will unmount when `in={false}` and animation is done
boolean
ScaleFade Props#
in
in
Show the component; triggers when enter or exit states
boolean
initialScale
initialScale
The initial scale of the element
number
0.95
reverse
reverse
If true
, the element will transition back to exit state
boolean
true
unmountOnExit
unmountOnExit
If true
, the element will unmount when `in={false}` and animation is done
boolean
Slide Props#
direction
direction
The direction to slide from
SlideDirection
right
in
in
Show the component; triggers when enter or exit states
boolean
unmountOnExit
unmountOnExit
If true
, the element will unmount when `in={false}` and animation is done
boolean
SlideFade Props#
in
in
Show the component; triggers when enter or exit states
boolean
offsetX
offsetX
The offset on the horizontal or x
axis
string | number
0
offsetY
offsetY
The offset on the vertical or y
axis
string | number
8
reverse
reverse
If true
, the element will be transitioned back to the offset when it leaves.
Otherwise, it'll only fade out
boolean
true
unmountOnExit
unmountOnExit
If true
, the element will unmount when `in={false}` and animation is done
boolean
Collapse Props#
animateOpacity
animateOpacity
If true
, the opacity of the content will be animated
boolean
true
endingHeight
endingHeight
The height you want the content in its expanded state.
string | number
auto
in
in
Show the component; triggers when enter or exit states
boolean
startingHeight
startingHeight
The height you want the content in its collapsed state.
string | number
0
unmountOnExit
unmountOnExit
If true
, the element will unmount when `in={false}` and animation is done
boolean
Props#
The transition components extends the framer-motion.
Fade Props#
in
in
Show the component; triggers when enter or exit states
boolean
unmountOnExit
unmountOnExit
If true
, the element will unmount when `in={false}` and animation is done
boolean
ScaleFade Props#
in
in
Show the component; triggers when enter or exit states
boolean
initialScale
initialScale
The initial scale of the element
number
0.95
reverse
reverse
If true
, the element will transition back to exit state
boolean
true
unmountOnExit
unmountOnExit
If true
, the element will unmount when `in={false}` and animation is done
boolean
Slide Props#
direction
direction
The direction to slide from
SlideDirection
right
in
in
Show the component; triggers when enter or exit states
boolean
unmountOnExit
unmountOnExit
If true
, the element will unmount when `in={false}` and animation is done
boolean
SlideFade Props#
in
in
Show the component; triggers when enter or exit states
boolean
offsetX
offsetX
The offset on the horizontal or x
axis
string | number
0
offsetY
offsetY
The offset on the vertical or y
axis
string | number
8
reverse
reverse
If true
, the element will be transitioned back to the offset when it leaves.
Otherwise, it'll only fade out
boolean
true
unmountOnExit
unmountOnExit
If true
, the element will unmount when `in={false}` and animation is done
boolean
Collapse Props#
animateOpacity
animateOpacity
If true
, the opacity of the content will be animated
boolean
true
endingHeight
endingHeight
The height you want the content in its expanded state.
string | number
auto
in
in
Show the component; triggers when enter or exit states
boolean
startingHeight
startingHeight
The height you want the content in its collapsed state.
string | number
0
unmountOnExit
unmountOnExit
If true
, the element will unmount when `in={false}` and animation is done
boolean