use-collapse
Animate height from 0 to auto and vice versa
Source
Docs
Package
Usage
use-collapse is the hook version of Collapse component.
It allows animation of height from 0 to auto and vice versa.
Horizontal collapse
use-horizontal-collapse works the same way as use-collapse but animates width instead of height:
ref prop
getCollapseProps return value now includes ref prop. It must be passed to the collapsible element
to make the hook work correctly.
Definition
Exported types
The UseCollapseInput, UseCollapseState, and UseCollapseReturnValue types are exported from the @mantine/hooks package;
you can import them in your application: