Authentication interface.
<form class="login" style="--accent:#241430;">
<h2 class="login__heading">Sign in</h2>
<label class="login__field">
<span class="login__label">Email</span>
<input type="email" name="email" value="jamie@example.com" autocomplete="username" />
</label>
<label class="login__field">
<span class="login__label">Password</span>
<div class="login__pwrap">
<input type="password" name="password" autocomplete="current-password" />
<button type="button" class="login__toggle" aria-pressed="false" aria-label="Show password"><svg width="16" height="16" viewBox="0 0 16 16" aria-hidden="true"><path d="M1 8s2.6-4.5 7-4.5S15 8 15 8s-2.6 4.5-7 4.5S1 8 1 8Z" fill="none" stroke="currentColor" stroke-width="1.3"/><circle cx="8" cy="8" r="2" fill="none" stroke="currentColor" stroke-width="1.3"/></svg></button>
</div>
</label>
<label class="login__remember">
<input type="checkbox" checked />
Remember me
</label>
<button type="submit" class="login__submit">Sign in</button>
</form>
<style>
.login { font: 14px/1.4 system-ui, sans-serif; color: #241430; background: #FAF7F2; width: 300px; padding: 22px; border-radius: 14px; box-sizing: border-box; border: 1px solid #24143018; }
.login__heading { margin: 0 0 16px; font-size: 18px; }
.login__field { display: block; margin-bottom: 14px; }
.login__label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 13px; }
.login input[type="email"], .login input[type="password"], .login input[type="text"] { width: 100%; box-sizing: border-box; padding: 9px 10px; border-radius: 8px; border: 1.5px solid #24143030; font: inherit; }
.login__pwrap { position: relative; }
.login__pwrap input { padding-right: 36px; }
.login__toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: none; background: none; cursor: pointer; color: #24143099; padding: 6px; border-radius: 6px; }
.login__toggle:focus-visible { outline: 2px solid var(--accent); }
.login__remember { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 16px; }
.login__submit { width: 100%; padding: 10px; border-radius: 8px; border: none; background: var(--accent); color: #FAF7F2; font-weight: 700; cursor: pointer; }
.login__submit:focus-visible { outline: 2px solid #241430; outline-offset: 2px; }
</style><form class="w-[300px] p-[22px] rounded-2xl box-border border border-[#24143018] font-sans text-sm text-[#241430] bg-[#FAF7F2]">
<h2 class="m-0 mb-4 text-lg">Sign in</h2>
<label class="block mb-3.5">
<span class="block mb-1 font-semibold text-[13px]">Email</span>
<input type="email" name="email" value="jamie@example.com" autocomplete="username" class="w-full box-border px-2.5 py-2 rounded-lg border-[1.5px] border-[#24143030] font-[inherit]" />
</label>
<label class="block mb-3.5">
<span class="block mb-1 font-semibold text-[13px]">Password</span>
<div class="relative">
<input type="password" name="password" autocomplete="current-password" class="w-full box-border px-2.5 py-2 pr-9 rounded-lg border-[1.5px] border-[#24143030] font-[inherit]" />
<button type="button" class="absolute right-1 top-1/2 -translate-y-1/2 border-none bg-transparent cursor-pointer text-[#241430]/60 p-1.5 rounded-md focus-visible:outline focus-visible:outline-2" style="outline-color:#241430" aria-pressed="false" aria-label="Show password"><svg width="16" height="16" viewBox="0 0 16 16" aria-hidden="true"><path d="M1 8s2.6-4.5 7-4.5S15 8 15 8s-2.6 4.5-7 4.5S1 8 1 8Z" fill="none" stroke="currentColor" stroke-width="1.3"/><circle cx="8" cy="8" r="2" fill="none" stroke="currentColor" stroke-width="1.3"/></svg></button>
</div>
</label>
<label class="flex items-center gap-2 text-[13px] mb-4">
<input type="checkbox" checked />
Remember me
</label>
<button type="submit" class="w-full py-2.5 rounded-lg border-none text-[#FAF7F2] font-bold cursor-pointer" style="background:#241430">Sign in</button>
</form>export function Login({
heading = "Sign in",
email = "jamie@example.com",
showPassword = false,
remember = true,
accent = "#241430",
}) {
const inputStyle = { width: "100%", boxSizing: "border-box", padding: "9px 10px", borderRadius: 8, border: "1.5px solid #24143030", font: "inherit" };
return (
<form style={{ font: "14px/1.4 system-ui, sans-serif", color: "#241430", background: "#FAF7F2", width: 300, padding: 22, borderRadius: 14, boxSizing: "border-box", border: "1px solid #24143018" }}>
<h2 style={{ margin: "0 0 16px", fontSize: 18 }}>{heading}</h2>
<label style={{ display: "block", marginBottom: 14 }}>
<span style={{ display: "block", marginBottom: 5, fontWeight: 600, fontSize: 13 }}>Email</span>
<input type="email" name="email" defaultValue={email} autoComplete="username" style={inputStyle} />
</label>
<label style={{ display: "block", marginBottom: 14 }}>
<span style={{ display: "block", marginBottom: 5, fontWeight: 600, fontSize: 13 }}>Password</span>
<div style={{ position: "relative" }}>
<input type={showPassword ? "text" : "password"} name="password" autoComplete="current-password" style={{ ...inputStyle, paddingRight: 36 }} />
<button type="button" aria-pressed={showPassword} aria-label="Show password"
style={{ position: "absolute", right: 4, top: "50%", transform: "translateY(-50%)", border: "none", background: "none", cursor: "pointer", color: "#24143099", padding: 6, borderRadius: 6 }}>
{showPassword
? <svg width="16" height="16" viewBox="0 0 16 16" aria-hidden="true"><path d="M1 8s2.6-4.5 7-4.5S15 8 15 8s-2.6 4.5-7 4.5S1 8 1 8Z" fill="none" stroke="currentColor" strokeWidth="1.3" /><circle cx="8" cy="8" r="2" fill="none" stroke="currentColor" strokeWidth="1.3" /><path d="M2 2l12 12" stroke="currentColor" strokeWidth="1.3" /></svg>
: <svg width="16" height="16" viewBox="0 0 16 16" aria-hidden="true"><path d="M1 8s2.6-4.5 7-4.5S15 8 15 8s-2.6 4.5-7 4.5S1 8 1 8Z" fill="none" stroke="currentColor" strokeWidth="1.3" /><circle cx="8" cy="8" r="2" fill="none" stroke="currentColor" strokeWidth="1.3" /></svg>}
</button>
</div>
</label>
<label style={{ display: "flex", alignItems: "center", gap: 8, fontSize: 13, marginBottom: 16 }}>
<input type="checkbox" defaultChecked={remember} />
Remember me
</label>
<button type="submit" style={{ width: "100%", padding: 10, borderRadius: 8, border: "none", background: accent, color: "#FAF7F2", fontWeight: 700, cursor: "pointer" }}>{heading}</button>
</form>
);
}