Skip to content

feat(cdk/dialog): Add Leaving Animation Support for dialog #32529

@XhstormR

Description

@XhstormR

Feature Description

For the dialog in the Material component, I can customize the animation by adding a panelClass: "sidenav-dialog" config in the typescript, and add the following styles in styles.scss:

.sidenav-dialog {
    animation: enter 0.3s ease-in-out;

    .mdc-dialog--closing {
      animation: leave 0.3s ease-in-out;
    }
}

However, when I switch to the dialog in the CDK, the exit animation no longer works.

The dialog in the CDK component should have more flexibility in customization, such as specifying the CSS class name when exit.

Use Case

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureThis issue represents a new feature or feature request rather than a bug or bug fixneeds triageThis issue needs to be triaged by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions