# CountdownButton

> The Countdown Button is a shadcn/ui component designed for time-sensitive actions, such as “Resend OTP” or retry mechanisms. Once clicked, the button starts a countdown timer and automatically disables itself, showing the remaining seconds (e.g., “Resend OTP in 20s”). After the countdown ends, it re-enables for further interactions. This component supports configurable sizes (sm, md, lg) and is highly reusable for workflows that require controlled user interactions, ensuring both clarity and functionality while maintaining a clean, modern UI.

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

## Install

```bash
npx shadcn@latest add "https://21st.dev/r/ruixen.ui/countdown-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
