Skip to content

Creating or picking transition? #5579

Answered by asyncLiz
omar2205 asked this question in Q&A
Discussion options

You must be logged in to vote

You can customize the transition by overriding those functions and returning your own animation keyframes to change any aspect of the animations.

There's a default open/close animation object that you can reference for the options available.

Each part of the dialog (like the dialog itself, the scrim, or the content) can be given one or more animations, represented as an array of Element.animate() arguments.

const dialog = document.querySelector('md-dialog');
dialog.getOpenAnimation = () => {
  // A simpler and faster fade-in animation
  return {
    // An array of one or more animations
    dialog: [
      // A single simple fade-in animation
      [
        // args for Element.animate(ke…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@omar2205
Comment options

@asyncLiz
Comment options

@omar2205
Comment options

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