UNPKG

@mui/material

Version:

Quickly build beautiful React apps. MUI is a simple and customizable component library to build faster, beautiful, and more accessible React applications. Follow your own design system, or start with Material Design.

73 lines (69 loc) 2.35 kB
import * as React from 'react'; import { SxProps } from '@mui/system'; import { InternalStandardProps as StandardProps, Theme } from '..'; import { TransitionProps } from '../transitions/transition'; import { CollapseClasses } from './collapseClasses'; export interface CollapseProps extends StandardProps<TransitionProps, 'timeout'> { /** * The content node to be collapsed. */ children?: React.ReactNode; className?: string; /** * Override or extend the styles applied to the component. */ classes?: Partial<CollapseClasses>; /** * The width (horizontal) or height (vertical) of the container when collapsed. * @default '0px' */ collapsedSize?: string | number; /** * The component used for the root node. * Either a string to use a HTML element or a component. */ component?: React.ElementType<TransitionProps>; /** * The transition timing function. * You may specify a single easing or a object containing enter and exit values. */ easing?: TransitionProps['easing']; /** * If `true`, the component will transition in. */ in?: boolean; /** * The transition orientation. * @default 'vertical' */ orientation?: 'horizontal' | 'vertical'; /** * The duration for the transition, in milliseconds. * You may specify a single timeout for all transitions, or individually with an object. * * Set to 'auto' to automatically calculate transition time based on height. * @default duration.standard */ timeout?: TransitionProps['timeout'] | 'auto'; /** * The system prop that allows defining system overrides as well as additional CSS styles. */ sx?: SxProps<Theme>; } /** * The Collapse transition is used by the * [Vertical Stepper](https://mui.com/components/steppers/#vertical-stepper) StepContent component. * It uses [react-transition-group](https://github.com/reactjs/react-transition-group) internally. * * Demos: * * - [Cards](https://mui.com/components/cards/) * - [Lists](https://mui.com/components/lists/) * - [Transitions](https://mui.com/components/transitions/) * * API: * * - [Collapse API](https://mui.com/api/collapse/) * - inherits [Transition API](http://reactcommunity.org/react-transition-group/transition/#Transition-props) */ export default function Collapse(props: CollapseProps): JSX.Element;