# 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

```bash
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](/content/docs/buttons/index.html). Add it with the shadcn CLI, which copies the source into `components/kokonutui/undo-button.tsx`, so the code is yours to change.

```bash
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`.

```bash
npm install lucide-react motion
```

### Usage

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

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

### Props

- `label`  
  `string`  
  Default: `
