Undo Toast

An advanced undo notification toast featuring an interactive progress countdown, pause-on-hover mechanics, action reversal animation, and versatile position anchoring.

Project archived

5 seconds remaining to restore project

Installation

Add the component directly to your repository using shadcn CLI:

npx shadcn@latest add Surajmaurya1/easyui/undo-toast

API Reference

PropTypeDefaultDescription
openbooleantrueVisibility state of the undo toast
titlestring'Project archived'Primary notification message title
descriptionstring'Changes will be permanent in a few seconds'Optional descriptive subtitle
undoLabelstring'Undo'Label for undo action trigger
restoredMessagestring'Restored successfully'Title displayed when action has been reversed
durationnumber5000Duration in milliseconds before auto-dismissal
variant'default' | 'success' | 'warning' | 'error' | 'info''default'Semantic visual tone
position'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right''bottom-center'Screen placement
onUndo() => voidundefinedCallback fired when user clicks Undo
onDismiss() => voidundefinedCallback fired when toast closes or expires
showProgressbooleantrueWhether to show the countdown bar