Account creation.
<form class="reg" style="--accent:#A8E6C1;">
<h2 class="reg__heading">Create your account</h2>
<label class="reg__field">
<span class="reg__label">Email</span>
<input type="email" value="" autocomplete="username" />
</label>
<label class="reg__field">
<span class="reg__label">Password</span>
<div class="reg__pwrap">
<input type="password" autocomplete="new-password" />
<button type="button" class="reg__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>
<span class="reg__hint">At least 8 characters, no need to include symbols.</span>
</label>
<label class="reg__terms">
<input type="checkbox" />
I agree to the Terms and Privacy Policy
</label>
<button type="submit" class="reg__submit">Create account</button>
</form>
<style>
.reg { 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; }
.reg__heading { margin: 0 0 16px; font-size: 18px; }
.reg__field { display: block; margin-bottom: 12px; }
.reg__label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 13px; }
.reg input { width: 100%; box-sizing: border-box; padding: 9px 10px; border-radius: 8px; border: 1.5px solid #24143030; font: inherit; }
.reg__pwrap { position: relative; }
.reg__pwrap input { padding-right: 36px; }
.reg__toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: none; background: none; cursor: pointer; color: #24143099; padding: 6px; border-radius: 6px; }
.reg__hint { display: block; margin-top: 5px; font-size: 11px; color: #24143088; }
.reg__terms { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; margin: 14px 0 16px; line-height: 1.4; }
.reg__submit { width: 100%; padding: 10px; border-radius: 8px; border: none; background: var(--accent); color: #14351f; font-weight: 700; cursor: pointer; }
.reg__toggle:focus-visible, .reg__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">Create your account</h2>
<label class="block mb-3">
<span class="block mb-1 font-semibold text-[13px]">Email</span>
<input type="email" value="" 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">
<span class="block mb-1 font-semibold text-[13px]">Password</span>
<div class="relative">
<input type="password" autocomplete="new-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" 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>
<span class="block mt-1 text-[11px] text-[#241430]/50">At least 8 characters, no need to include symbols.</span>
</label>
<label class="flex items-start gap-2 text-xs my-3.5 leading-snug">
<input type="checkbox" />
I agree to the Terms and Privacy Policy
</label>
<button type="submit" class="w-full py-2.5 rounded-lg border-none font-bold cursor-pointer text-[#14351f]" style="background:#A8E6C1">Create account</button>
</form>export function Registration({
heading = "Create your account",
email = "",
showPassword = false,
termsAccepted = false,
accent = "#A8E6C1",
}) {
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: 12 }}>
<span style={{ display: "block", marginBottom: 5, fontWeight: 600, fontSize: 13 }}>Email</span>
<input type="email" defaultValue={email} autoComplete="username" style={inputStyle} />
</label>
<label style={{ display: "block", marginBottom: 12 }}>
<span style={{ display: "block", marginBottom: 5, fontWeight: 600, fontSize: 13 }}>Password</span>
<div style={{ position: "relative" }}>
<input type={showPassword ? "text" : "password"} autoComplete="new-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>
<span style={{ display: "block", marginTop: 5, fontSize: 11, color: "#24143088" }}>At least 8 characters, no need to include symbols.</span>
</label>
<label style={{ display: "flex", alignItems: "flex-start", gap: 8, fontSize: 12, margin: "14px 0 16px", lineHeight: 1.4 }}>
<input type="checkbox" defaultChecked={termsAccepted} />
I agree to the Terms and Privacy Policy
</label>
<button type="submit" style={{ width: "100%", padding: 10, borderRadius: 8, border: "none", background: accent, color: "#14351f", fontWeight: 700, cursor: "pointer" }}>Create account</button>
</form>
);
}