Skip to content
Discussion options

You must be logged in to vote

Hi @WebAFilippov,

to animate when unmount you can do the following

.HoverCardContent {
  transform-origin: var(--radix-hover-card-content-transform-origin);
}
.HoverCardContent[data-state="open"] {
  animation: scaleIn 0.5s ease-out;
}
.HoverCardContent[data-state="closed"] {
  animation: scaleOut 0.5s ease-out;
}


@keyframes scaleIn {
from {
opacity: 0;
transform: scale(0);
}
to {
opacity: 1;
transform: scale(1);
}
}

@keyframes scaleOut {
from {
opacity: 1;
transform: scale(1);
}
to {
opacity: 0;
transform: scale(0);
}
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@WebAFilippov
Comment options

Answer selected by benoitgrelard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants