No results found

Popover

Animations

Entry and exit animations

Value based state

Is open: false

Signal based state

Is open: false

Relevant CSS:

.popover-transition {
  opacity: 0;
  transition: opacity 0.3s, overlay 0.3s, display 0.3s;
  transition-behavior: allow-discrete;
}

.popover-transition:popover-open {
  opacity: 1;
}

/* @starting-style needs to be after the previous [popover]:popover-open rule
to take effect, as the specificity is the same */

@starting-style {
  .popover-transition:popover-open {
    opacity: 0;
  }
}

Why no keyframe examples?

Transitions can be interrupted mid-animation. When users interact quickly (opening then immediately closing a popover), transitions smoothly reverse while keyframes must complete their full animation cycle.