Reauthentication

Request to authenticate again.

Confirm it’s you

Please re-enter your password to change your billing email.

html

<form class="reauth" style="--accent:#E8A020;">
  <h3 class="reauth__heading">Confirm it’s you</h3>
  <p class="reauth__copy">Please re-enter your password to change your billing email.</p>
  <label class="reauth__field">
    <span class="reauth__label">Password for jamie@example.com</span>
    <div class="reauth__pwrap">
      <input type="password" autocomplete="current-password" />
      <button type="button" class="reauth__toggle" aria-pressed="false" aria-label="Show password">Show</button>
    </div>
  </label>
  <button type="submit" class="reauth__submit">Confirm</button>
</form>
<style>
.reauth { font: 14px/1.4 system-ui, sans-serif; color: #241430; background: #FAF7F2; width: 300px; padding: 20px; border-radius: 14px; box-sizing: border-box; border: 1px solid #24143018; }
.reauth__heading { margin: 0 0 6px; font-size: 16px; }
.reauth__copy { margin: 0 0 16px; font-size: 13px; color: #24143099; }
.reauth__field { display: block; margin-bottom: 16px; }
.reauth__label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 13px; }
.reauth input { width: 100%; box-sizing: border-box; padding: 9px 10px; border-radius: 8px; border: 1.5px solid #24143030; font: inherit; }
.reauth__pwrap { position: relative; }
.reauth__pwrap input { padding-right: 56px; }
.reauth__toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: none; background: none; cursor: pointer; color: #241430; font-weight: 700; font-size: 12px; padding: 4px 6px; }
.reauth__submit { width: 100%; padding: 10px; border-radius: 8px; border: none; background: var(--accent); color: #241430; font-weight: 700; cursor: pointer; }
</style>

tailwind

<form class="w-[300px] p-5 rounded-2xl box-border border border-[#24143018] font-sans text-sm text-[#241430] bg-[#FAF7F2]">
  <h3 class="m-0 mb-1.5 text-base">Confirm it’s you</h3>
  <p class="m-0 mb-4 text-[13px] text-[#241430]/60">Please re-enter your password to change your billing email.</p>
  <label class="block mb-4">
    <span class="block mb-1 font-semibold text-[13px]">Password for jamie@example.com</span>
    <div class="relative">
      <input type="password" autocomplete="current-password" class="w-full box-border px-2.5 py-2 pr-14 rounded-lg border-[1.5px] border-[#24143030] font-[inherit]" />
      <button type="button" class="absolute right-1.5 top-1/2 -translate-y-1/2 border-none bg-transparent cursor-pointer text-[#241430] font-bold text-xs px-1.5 py-1" aria-pressed="false" aria-label="Show password">Show</button>
    </div>
  </label>
  <button type="submit" class="w-full py-2.5 rounded-lg border-none font-bold cursor-pointer text-[#241430]" style="background:#E8A020">Confirm</button>
</form>

react

export function Reauthentication({
  heading = "Confirm it’s you",
  actionLabel = "change your billing email",
  email = "jamie@example.com",
  showPassword = false,
  accent = "#E8A020",
}) {
  return (
    <form style={{ font: "14px/1.4 system-ui, sans-serif", color: "#241430", background: "#FAF7F2", width: 300, padding: 20, borderRadius: 14, boxSizing: "border-box", border: "1px solid #24143018" }}>
      <h3 style={{ margin: "0 0 6px", fontSize: 16 }}>{heading}</h3>
      <p style={{ margin: "0 0 16px", fontSize: 13, color: "#24143099" }}>Please re-enter your password to {actionLabel}.</p>
      <label style={{ display: "block", marginBottom: 16 }}>
        <span style={{ display: "block", marginBottom: 5, fontWeight: 600, fontSize: 13 }}>Password for {email}</span>
        <div style={{ position: "relative" }}>
          <input type={showPassword ? "text" : "password"} autoComplete="current-password"
            style={{ width: "100%", boxSizing: "border-box", padding: "9px 10px", paddingRight: 56, borderRadius: 8, border: "1.5px solid #24143030", font: "inherit" }} />
          <button type="button" aria-pressed={showPassword} aria-label="Show password"
            style={{ position: "absolute", right: 6, top: "50%", transform: "translateY(-50%)", border: "none", background: "none", cursor: "pointer", color: "#241430", fontWeight: 700, fontSize: 12, padding: "4px 6px" }}>
            {showPassword ? "Hide" : "Show"}
          </button>
        </div>
      </label>
      <button type="submit" style={{ width: "100%", padding: 10, borderRadius: 8, border: "none", background: accent, color: "#241430", fontWeight: 700, cursor: "pointer" }}>Confirm</button>
    </form>
  );
}