---
title: "Hold Button | Free React & Tailwind Craft Component | Motion UI"
canonical: "https://blacknest.dev/motion/c/craft/hold-button"
github_source: "https://github.com/Rkj0123/motion-ui-skill/blob/main/components/buttons/hold-button.tsx"
install_command: "npx motion-ui-skill add hold-button"
dependencies: ["clsx","react","tailwind-merge"]
category: "craft"
subcategory: "buttons"
---

# Hold Button

> Hold-to-confirm button whose inner fill grows smoothly from 0 to 100% with shake-to-abort feedback.

## Install

```bash
npx motion-ui-skill add hold-button
```

## Dependencies

- `clsx`
- `react`
- `tailwind-merge`

## Usage

```tsx
"use client";

import { HoldButton } from "@/components/buttons/hold-button";

export function HoldButtonDemo() {
  return (
    <div className="flex items-center justify-center p-6">
      <HoldButton>Click Me</HoldButton>
    </div>
  );
}
```

## API Reference

### HoldButton

| Prop | Type | Default | Required | Description |
| :--- | :--- | :--- | :--- | :--- |
| `durationMs` | `number` | 1500 | No | Required continuous press duration |
| `onComplete` | `() => void` | — | No | Triggered when hold fill reaches 100% |
| `className` | `string` | — | No | Additional CSS classes |

## Source Files

- [components/buttons/hold-button.tsx](https://github.com/Rkj0123/motion-ui-skill/blob/main/components/buttons/hold-button.tsx)
- [lib/utils.ts](https://github.com/Rkj0123/motion-ui-skill/blob/main/lib/utils.ts)
