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-button

Components install as source into your project. The interactive page also includes preview, code, documentation and install tabs.

Dependencies

  • clsx
  • lucide-react
  • react
  • tailwind-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

  • clsx
  • lucide-react
  • react
  • tailwind-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

Browse this category