@empathyco/x-components
Version:
Empathy X Components
31 lines (19 loc) • 990 B
Markdown
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@empathyco/x-components](./x-components.md) > [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) => void; cleanUpAnimationStyles: (element: HTMLElement) => void; collapse: (element: HTMLElement) => void; }
Composable for the module.