Skip to content

Transition exitDuration property not working correctly #6381

@andrew-stockdale-paytently

Description

Dependencies check up

  • I have verified that I use latest version of all @mantine/* packages

What version of @mantine/* packages do you have in package.json?

7.10.2

What package has an issue?

@mantine/core

What framework do you use?

Vite

In which browsers you can reproduce the issue?

Chrome

Describe the bug

The exit duration property doesn't seem to have any effect. With the following code, the span both mounts and unmounts in 1ms, rather than unmounting over 5s.

<Transition mounted={opened} duration={1} exitDuration={5000}> {(transitionStyles) => <span style={transitionStyles}>Open</span>} </Transition>

Removing the duration property results in both appearing and disappearing over the default 250ms.

Annoyingly, the codesandbox I've attached doesn't have the exact same issue, but after clicking the button a few times you'll see the transition timers end up in a strange state where the animation fades out instantly.

If possible, include a link to a codesandbox with a minimal reproduction

https://codesandbox.io/p/sandbox/mantine-react-template-forked-cxlrsn?file=%2Fsrc%2FApp.tsx%3A10%2C48

Possible fix

No response

Self-service

  • I would be willing to implement a fix for this issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    FixedCompleted issues that will be published with next patch (1.0.X)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions