Question on Hover Card #2496
Answered
by
joaom00
WebAFilippov
asked this question in
Help
-
hello everyone. please tell me how to set up the animation of the output of content out of focus .HoverCardContent { @Keyframes scaleIn { Perfectly animates the appearance, the survey how to animate the closure |
Beta Was this translation helpful? Give feedback.
Answered by
joaom00
Oct 30, 2023
Replies: 1 comment 1 reply
-
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);
}
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
benoitgrelard
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi @WebAFilippov,
to animate when unmount you can do the following