Request Reset Email
Step one of a reset: an email field and a submit that mails a recovery link.
3 फ्रेमवर्कशुरुआती
A new-password and confirm-password pair with a show toggle and a live mismatch hint.
<!--
Step two: choose a new password, confirm it. Both fields carry
autocomplete="new-password" so a password manager offers to generate and save,
never to autofill the old one. The show toggle swaps the input type in JS.
-->
<div class="mx-auto w-full max-w-sm rounded-2xl border border-gray-200 bg-white p-6 shadow-sm sm:p-8 dark:border-gray-800 dark:bg-gray-950">
<h1 class="text-xl font-bold tracking-tight text-gray-900 dark:text-gray-100">Set a new password</h1>
<p class="mt-1 text-sm text-gray-600 dark:text-gray-400">Use at least 8 characters. Make it hard to guess.</p>
<form class="mt-6 space-y-4" action="#" method="post">
<div>
<label for="rp-new" class="block text-sm font-medium text-gray-700 dark:text-gray-300">New password</label>
<div class="relative mt-1.5">
<input
id="rp-new"
name="password"
type="password"
autocomplete="new-password"
required
minlength="8"
placeholder="At least 8 characters"
class="w-full rounded-lg border border-gray-300 bg-white px-3.5 py-2.5 pr-16 text-sm text-gray-900 placeholder:text-gray-500 focus-visible:border-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-100 dark:placeholder:text-gray-400 dark:focus-visible:ring-blue-400"
/>
<button type="button" class="absolute inset-y-0 right-0 flex items-center px-3 text-xs font-medium text-gray-500 hover:text-gray-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600 dark:text-gray-400 dark:hover:text-gray-200 dark:focus-visible:ring-blue-400">Show</button>
</div>
</div>
<div>
<label for="rp-confirm" class="block text-sm font-medium text-gray-700 dark:text-gray-300">Confirm password</label>
<input
id="rp-confirm"
name="confirm"
type="password"
autocomplete="new-password"
required
placeholder="Re-enter your password"
class="mt-1.5 w-full rounded-lg border border-gray-300 bg-white px-3.5 py-2.5 text-sm text-gray-900 placeholder:text-gray-500 focus-visible:border-transparent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600 dark:border-gray-700 dark:bg-gray-900 dark:text-gray-100 dark:placeholder:text-gray-400 dark:focus-visible:ring-blue-400"
/>
</div>
<button type="submit" class="w-full rounded-lg bg-blue-600 px-5 py-2.5 text-sm font-semibold text-white transition-colors hover:bg-blue-700 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-600 focus-visible:ring-offset-2 focus-visible:ring-offset-white motion-reduce:transition-none dark:focus-visible:ring-blue-400 dark:focus-visible:ring-offset-gray-950">
Update password
</button>
</form>
</div>| Prop | टाइप | डिफ़ॉल्ट | विवरण |
|---|---|---|---|
title | string | 'Set a new password' | कार्ड की हेडिंग टेक्स्ट। |
subtitle | string | - | Subtitle |
submitLabel | string | 'Update password' | Submit label |
onSubmit | (data: { password: string }) => void | - | सबमिट होने पर फ़ॉर्म के मानों के साथ कॉल होता है। |
className | string | - | रूट एलिमेंट पर मर्ज होने वाली अतिरिक्त क्लासेज़। |
Both fields carry `autocomplete="new-password"` so a manager offers to generate and save rather than autofill the old value; the toggle swaps the input `type` instead of exposing a second plaintext field. The confirm field flags a mismatch inline and blocks submit until it matches.