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.

26 lines 703 B
import * as React from 'react'; /** * Calls the provided function when the CSS open/close animation or transition completes. */ export declare function useOpenChangeComplete(parameters: useOpenChangeComplete.Parameters): void; export declare namespace useOpenChangeComplete { interface Parameters { /** * Whether the hook is enabled. * @default true */ enabled?: boolean; /** * Whether the element is open. */ open?: boolean; /** * Ref to the element being closed. */ ref: React.RefObject<HTMLElement | null>; /** * Function to call when the animation completes (or there is no animation). */ onComplete: () => void; } }