UNPKG

1.39 kBTypeScriptView Raw
1import * as React from 'react';
2export interface CssTransitionProps {
3 children?: React.ReactNode;
4 className?: string;
5 /**
6 * The name of the CSS class applied to the component when the transition
7 * is requested to enter.
8 */
9 enterClassName?: string;
10 /**
11 * The name of the CSS class applied to the component when the transition
12 * is requested to exit.
13 */
14 exitClassName?: string;
15 /**
16 * The name of the CSS property that is transitioned the longest (has the largest `transition-duration`) on exit.
17 * This is used to determine when the transition has ended.
18 * If not specified, the transition will be considered finished end when the first property is transitioned.
19 * If all properties have the same `transition-duration` (or there is just one transitioned property), this can be omitted.
20 */
21 lastTransitionedPropertyOnExit?: string;
22}
23/**
24 * A utility component that hooks up to the Base UI transitions API and
25 * applies a CSS transition to its children when necessary.
26 *
27 * Demos:
28 *
29 * - [Transitions](https://mui.com/base-ui/react-transitions/)
30 *
31 * API:
32 *
33 * - [CssTransition API](https://mui.com/base-ui/react-transitions/components-api/#css-transition)
34 */
35declare const CssTransition: React.ForwardRefExoticComponent<CssTransitionProps & React.RefAttributes<HTMLDivElement>>;
36export { CssTransition };