Use History โ shadcn/ui Component by tomei | shadcnregistry
Use History
component
An undo/redo hook for any state. Consecutive edits to the same field merge into one step, and Ctrl+Z / Ctrl+Shift+Z hotkeys are opt-in so typing in inputs keeps its native undo.