# Magic Link and OTP Code Login Form

> Magic Link and OTP Code Login Form for React and Tailwind CSS (shadcn/ui) offers passwordless sign-in. It is built to move users from email to access with less friction. Includes an opening envelope, six-digit paste and autofill, automatic verification, resend countdown, and password fallback. Supports controlled email, code, step and status, keyboard access, reduced motion, and light/dark themes. Use it for SaaS and member portals. The included demo shows a wrong code and retry; the component makes no requests. Requires React and lucide-react, with no animation library.

- Author: [DHxWhy](https://21st.dev/@dhxwhy)
- License: mit
- Tags: Sign in, Login Form, Authentication, OTP, Magic Link
- npm dependencies: lucide-react
- Live preview: https://21st.dev/@dhxwhy/components/magic-link-otp-login

## Install

```bash
npx shadcn@latest add "https://21st.dev/r/dhxwhy/magic-link-otp-login?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 · More like this: https://21st.dev/community/components/s/sign-in.md
