Skip to main content

collapseToast

ParameterTypeRequiredDefaultDescription
nodeHTMLElementβœ“-The html node that reference the toast. Accessible via nodeRef.current
done() => voidβœ“-Need to be called to remove the toast.
durationnumber | [number,number]✘300The duration of the collapse transition
import { collapseToast } from 'react-toastify';

collapse(node, done);
Tips

This function is useful when you build your own transition with the Transition component from react-transition-group.