Skip to content

How can I add "ease-in-out" to _hover for my transition? #6124

Answered by hugobqd
snezhoque asked this question in Q&A
Discussion options

You must be logged in to vote

Hello! Split transform's shorthand properties into transitionTimingFunction and transitionDuration (Here are the defaults token, but every valid css attributes is allowed : https://github.com/chakra-ui/chakra-ui/blob/main/packages/theme/src/foundations/transition.ts)

<Container
  _hover={{
    shadow: 'md',
    transform: 'translateY(-5px)',
    transitionDuration: '0.2s',
    transitionTimingFunction: "ease-in-out"
  }}
>

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@snezhoque
Comment options

@sleekLancelot
Comment options

@Rishi1204
Comment options

@bstrihova
Comment options

Answer selected by snezhoque
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants