Drag to Confirm

Drag to Confirm: A minimalist physical drag-to-confirm slider for high-stakes and destructive actions, equipped with progressive track fill physics, spring snapback resistance, full light/dark theme adaptation, and accessible keyboard controls. Free MIT React & Next.js source with Motion and Tailwind CSS, live preview, CLI install and docs.

Install Drag to Confirm

npx motion-ui-skill add drag-to-confirm

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

Dependencies

  • clsx
  • lucide-react
  • motion
  • react
  • tailwind-merge

Source files

Drag to Confirm

A minimalist physical drag-to-confirm slider for high-stakes and destructive actions, equipped with progressive track fill physics, spring snapback resistance, full light/dark theme adaptation, and accessible keyboard controls.

Install

npx motion-ui-skill add drag-to-confirm

Dependencies

  • clsx
  • lucide-react
  • motion
  • react
  • tailwind-merge

Usage

"use client";

import { DragToConfirm as DragToConfirm } from "@/components/craft/drag-to-confirm";

export function Example() {
  return (
    <div className="p-6">
      <DragToConfirm />
    </div>
  );
}

Browse this category