<!-- @dsCard group="Components / Forms" viewport="640x300" name="NumberField" subtitle="A bounded number — seats, buffer minutes, quantities. The value is centred and tabular so it never shifts." -->
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>NumberField</title>
<link rel="stylesheet" href="../../styles.css"><link rel="stylesheet" href="../_card/card.css">
<script src="https://unpkg.com/react@18.3.1/umd/react.development.js" integrity="sha384-hD6/rw4ppMLGNu3tX5cjIb+uRZ7UkRJ6BPkLpg4hAu/6onKUg4lLsHAs9EBPT82L" crossorigin="anonymous"></script>
<script src="https://unpkg.com/react-dom@18.3.1/umd/react-dom.development.js" integrity="sha384-u6aeetuaXnQ38mYT8rp6sbXaQe3NL9t+IBXmnYxwkUI2Hw4bsp2Wvmx4yRQF1uAm" crossorigin="anonymous"></script>
<script src="https://unpkg.com/@babel/standalone@7.29.0/babel.min.js" integrity="sha384-m08KidiNqLdpJqLq95G/LEi8Qvjl/xUYll3QILypMoQ65QorJ9Lvtp2RXYGBFj1y" crossorigin="anonymous"></script>
<script src="https://unpkg.com/lucide@0.544.0/dist/umd/lucide.min.js"></script>
<script src="../../_ds_bundle.js"></script>
<script src="../_card/card.js"></script>
</head><body>
<header class="ch"><h1>NumberField</h1><p>A bounded number — seats, buffer minutes, quantities. The value is centred and tabular so it never shifts.</p></header>
<div id="root"></div>
<ul class="notes">
<li>Give it <code>min</code> and <code>max</code>. An unbounded stepper is an Input.</li>
<li>For an imprecise magnitude the user is judging rather than typing, use Slider.</li>
<li>The steppers respect <code>step</code>; keep the step meaningful (5 minutes, 1 seat).</li>
</ul>
<script type="text/babel">
const {Field, FieldLabel, FieldDescription, NumberField} = window.OriginDesignSystem_7c998b;
const {Ic, mount} = window.OriginCard;
function Demo(){return (<>
  <div className="spec" style={{gap:24,alignItems:"flex-start"}}>
    <Field style={{width:170}}><FieldLabel htmlFor="s1">Seats per slot</FieldLabel><NumberField id="s1" defaultValue={4} min={1} max={20} /><FieldDescription>1–20 attendees.</FieldDescription></Field>
    <Field style={{width:170}}><FieldLabel htmlFor="s2">Buffer (minutes)</FieldLabel><NumberField id="s2" defaultValue={15} min={0} max={60} step={5} /></Field>
  </div>
</>)}
mount(<Demo />);
</script>
</body></html>