Drag to Confirm
A physical drag-to-confirm slider for high-stakes and destructive actions, equipped with elastic spring snapback physics, progressive track illumination, and accessible keyboard fallbacks.
Slide to delete pipeline →
Physical resistance spring handle with tactile snapback
Installation
Add the component directly to your repository using shadcn CLI:
npx shadcn@latest add Surajmaurya1/easyui/drag-to-confirm
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
| label | string | 'Slide to confirm' | Action instruction text rendered along track |
| confirmedLabel | string | 'Confirmed ✓' | Text shown when slider is locked into completion |
| actionType | 'delete' | 'archive' | 'confirm' | 'submit' | 'unlock' | 'continue' | 'confirm' | Action preset style |
| onConfirm | () => void | undefined | Callback triggered upon successful confirmation completion |
| autoResetDelay | number | 2500 | Milliseconds before resetting back to start |
| disabled | boolean | false | Disables slider gesture and interaction |