<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@empathyco/x-components](./x-components.md) &gt; [useCollapseAnimation](./x-components.usecollapseanimation.md)

## useCollapseAnimation() function

Returns parametrized methods to use in a component to allow the collapsing of the provided property.

**Signature:**

```typescript
export declare function useCollapseAnimation(property: AnimatedProperty): {
    expand: (element: HTMLElement) => void;
    cleanUpAnimationStyles: (element: HTMLElement) => void;
    collapse: (element: HTMLElement) => void;
};
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  property | AnimatedProperty | The property that will be animated. |

**Returns:**

{ expand: (element: HTMLElement) =&gt; void; cleanUpAnimationStyles: (element: HTMLElement) =&gt; void; collapse: (element: HTMLElement) =&gt; void; }

Composable for the module.

