ppll

Related posts

Emil Kowalski x.com

One of my favorite details of Sonner: By default the toast disappears after 4 seconds unless you hover over it. But what if a toast is triggered and the user switches to a different tab? 4 seconds would pass and the toast would never be seen. That’s why there’s a `useIsDocumentHidden` hook that checks if the document (tab) is hidden, and if so, it will pause the timer. This can be done with the "visibilitychange" event listener on the document. A small detail that improves the experience.

hoversonnertimer

The the words it uses that this site has seen least often elsewhere. Posts are matched on those words alone — nothing here is a summary of this one.

Nothing else here says these words yet. search the site for it.