Repository navigation
Toast: swipe-to-dismiss #3376
Closed
aaron-easygo
started this conversation in
Ideas
Replies: 1 comment
|
We'll add this to v2 instead. Thanks |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Zag's toast machine has no swipe/drag-to-dismiss. For anyone migrating from
sonner(or Base UI's toast, which exposesdata-swipe-directionand--toast-swipe-movement-x/yfor exactly this), that is a behaviour regression — most visibly on touch devices, where flicking a toast away is the established gesture and the close button is a small target.The machine already tracks per-toast geometry (height measurement, stacking offsets, hover-to-pause), so the pieces a swipe needs — pointer tracking on the root, a translate while dragging, a dismissal threshold, and a
data-swipe-direction-style hook for exit styling — would sit beside existing machinery rather than fighting it.Is swipe-to-dismiss in scope for the toast machine's roadmap, or deliberately out? If it is in scope and you can sketch the direction you'd want (e.g. config for which directions are dismissable per placement), I'm happy to contribute the implementation.
All reactions