Numeric input.
<label class="ni" for="ni-1">
<span class="ni__label">Quantity</span>
<input class="ni__input" id="ni-1" type="number" min="0" max="10" step="1" style="--accent:#A8E6C1;">
</label>
<style>
.ni { display: block; font: 14px system-ui, sans-serif; color: #241430; max-width: 160px; }
.ni__label { display: block; margin-bottom: 6px; font-weight: 500; }
.ni__req { color: #241430; }
.ni__input { width: 100%; box-sizing: border-box; padding: 10px 12px; font: inherit; color: #241430; background: #FAF7F2; border: 1.5px solid #24143040; border-radius: 8px; }
.ni__input:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
</style><label class="block max-w-[160px] font-sans text-sm text-[#241430]" for="ni-tw-1">
<span class="block mb-1.5 font-medium">Quantity</span>
<input id="ni-tw-1" type="number" min="0" max="10" step="1"
class="w-full box-border px-3 py-2.5 bg-[#FAF7F2] border-[1.5px] border-[#24143040] rounded-lg focus-visible:outline-none" style="border-color:#A8E6C1;">
</label>export function NumberInput({
label = "Quantity",
min = 0,
max = 10,
step = 1,
accent = "#A8E6C1",
required = false,
}) {
return (
<label style={{ display: "block", maxWidth: 160, fontFamily: "system-ui, sans-serif", fontSize: 14, color: "#241430" }}>
<span style={{ display: "block", marginBottom: 6, fontWeight: 500 }}>{label}{required && " *"}</span>
<input type="number" min={min} max={max} step={step} required={required} style={{
width: "100%", boxSizing: "border-box", padding: "10px 12px", font: "inherit", color: "#241430",
background: "#FAF7F2", border: `1.5px solid ${accent}`, borderRadius: 8,
}} />
</label>
);
}