Undo Button - React Component | Kokonut UI

Undo Button

An action button that gives you a few seconds to take it back, with the time left drawn around its own edge.

Install with

npx shadcn@latest add https://kokonutui.com/r/undo-button.json, then show me how to use it.

Installation

Undo Button is a free, open-source React component in the Kokonut UI Buttons collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/undo-button.tsx, so the code is yours to change.

npx shadcn@latest add @kokonutui/undo-button

Or add it by hand: install its packages, then copy the source from above into components/kokonutui/undo-button.tsx.

npm install lucide-react motion

Usage

import UndoButton from "@/components/kokonutui/undo-button";

export default function Example() {
  return <UndoButton />;
}

Props