Closed TheMikeyRoss closed 3 months ago
Is there a way to disable the auto-dismiss? I mean I can use an extremely long duration. But I'm using the sonner for cookie consent and I don't want the toast to go away unless the user clicks on "agree" (which will dismiss the toast)
As mentioned here, you'll have to use JavaScripts' Infinity (read more)
Infinity
createSonner("Something", { duration: Infinity, });
Is there a way to disable the auto-dismiss? I mean I can use an extremely long duration. But I'm using the sonner for cookie consent and I don't want the toast to go away unless the user clicks on "agree" (which will dismiss the toast)