UNPKG

@base-ui-components/react

Version:

Base UI is a library of headless ('unstyled') React components and low-level hooks. You gain complete control over your app's CSS and accessibility features.

23 lines (22 loc) 774 B
/** * Calls the provided function when the CSS exit animation or transition completes. * Useful for unmounting the component after animating out. */ export declare function useAfterExitAnimation(parameters: useAfterExitAnimation.Parameters): void; export declare namespace useAfterExitAnimation { interface Parameters { /** * Determines if the component is open. * The logic runs when the component goes from open to closed. */ open: boolean; /** * Ref to the element being closed. */ animatedElementRef: React.RefObject<HTMLElement | null>; /** * Function to call when the animation finishes (or there is no animation). */ onFinished: () => void; } }