Skip to Content
DocsResourcesPricingShowcase

Transitions

JSX style props for controlling an element's transition and animation.

Use the transition prop to control the transition of an element.

// hardcoded value
<Box bg="red.400" _hover={{ bg: "red.500" }} transition="background 0.2s ease-in-out">
  Hover me
</Box>

// shortcut value
<Box bg="red.400" _hover={{ bg: "red.500" }} transition="backgrounds">
  Hover me
</Box>
PropCSS PropertyToken Category
transitiontransition-

Use the transitionTimingFunction prop to control the timing function of a transition.

<Box
  bg="red.400"
  _hover={{ bg: "red.500" }}
  transition="backgrounds"
  transitionTimingFunction="ease-in-out"
>
  Hover me
</Box>
PropCSS PropertyToken Category
transitionTimingFunctiontransition-timing-functioneasings

Use the transitionDuration prop to control the duration of a transition.

<Box
  bg="red.400"
  _hover={{ bg: "red.500" }}
  transition="backgrounds"
  transitionDuration="fast"
>
  Hover me
</Box>
PropCSS PropertyToken Category
transitionDurationtransition-durationdurations

Use the transitionDelay prop to control the delay of a transition.

<Box
  bg="red.400"
  _hover={{ bg: "red.500" }}
  transition="backgrounds"
  transitionDelay="fast"
>
  Hover me
</Box>
PropCSS PropertyToken Category
transitionDelaytransition-delaydurations

Use the animation prop to control the animation of an element.

<Box animation="bounce" />
PropCSS PropertyToken Category
animationanimation-name animations

Use the animationName prop to control the name of an animation. Compose multiple animation names to create complex animations.

info
The value of the animation prop points to a global keyframe animation. Use the theme.keyframes object to define the animation.
<Box animationName="bounce, fade-in" animationDuration="fast" />
PropCSS PropertyToken Category
animationNameanimation-nameanimations

Use the animationTimingFunction prop to control the timing function of an animation.

<Box animation="bounce" animationTimingFunction="ease-in-out" />
PropCSS PropertyToken Category
animationTimingFunctionanimation-timing-functioneasings

Use the animationDuration prop to control the duration of an animation.

<Box animation="bounce" animationDuration="fast" />
PropCSS PropertyToken Category
animationDurationanimation-durationdurations

Use the animationDelay prop to control the delay of an animation.

<Box animation="bounce" animationDelay="fast" />
PropCSS PropertyToken Category
animationDelayanimation-delaydurations

Previous

Transforms

Next

Typography