# Confirmation Button

> The Confirmation Button is a shadcn/ui-based component designed to prevent accidental actions by requiring explicit user confirmation. On the first click, the button changes its state to display a confirmation prompt along with ✅ (confirm) and ❌ (cancel) options, giving users a clear choice before proceeding. This is particularly useful for destructive or critical actions like Delete, Archive, or Submit final changes, where mistakes can have significant consequences. The component supports multiple sizes (sm, md, lg) and integrates seamlessly with Tailwind styling, making it visually consistent while improving safety and usability in interactive workflows.

- Author: [Ruixen UI](https://21st.dev/@ruixen.ui)
- Library: [Ruixen UI](https://21st.dev/@ruixen.ui/library/ruixen-ui)
- License: unknown
- Live preview: https://21st.dev/@ruixen.ui/components/confirmation-button

## Install

```bash
npx shadcn@latest add "https://21st.dev/r/ruixen.ui/confirmation-button?api_key=$API_KEY_21ST"
```

Requires a 21st API key (generate one at https://21st.dev/mcp) passed as `API_KEY_21ST`. Free accounts get a limited number of installs per day; unlimited on a paid plan — see https://21st.dev/pricing.

Full component directory: https://21st.dev/llms.txt
