Hold to Delete
Hold to Delete: Press and hold as a fill sweeps across; release early to cancel, hold to the end to delete. Prevents accidental destructive taps. Free MIT React & Next.js source with Motion and Tailwind CSS, live preview, CLI install and docs.
Install Hold to Delete
npx motion-ui-skill add hold-to-delete-buttonComponents install as source into your project. The interactive page also includes preview, code, documentation and install tabs.
Dependencies
clsxlucide-reactreacttailwind-merge
Source files
Hold to Delete
Press and hold as a fill sweeps across; release early to cancel, hold to the end to delete. Prevents accidental destructive taps.
Install
npx motion-ui-skill add hold-to-delete-button
Dependencies
clsxlucide-reactreacttailwind-merge
Usage
"use client";
import { HoldToDeleteButton } from "@/components/buttons/hold-to-delete-button";
export function HoldToDeleteButtonDemo() {
return (
<div className="flex items-center justify-center p-6">
<HoldToDeleteButton />
</div>
);
}
API Reference
HoldToDeleteButton
| Prop | Type | Default | Required | Description |
|---|---|---|---|---|
className |
string |
— | No | Additional CSS classes |