<!-- @dsCard group="Components / Forms" viewport="640x290" name="Label" subtitle="The control label — 14px medium, sitting 8px above its input inside a Field." -->
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Label</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>Label</h1><p>The control label — 14px medium, sitting 8px above its input inside a Field.</p></header>
<div id="root"></div>
<ul class="notes">
<li>Always bound to a control with <code>htmlFor</code>. An unbound label is a bug, not a caption.</li>
<li>Inside a Field use <code>FieldLabel</code>, which adds the rhythm. Bare <code>Label</code> is for rows you lay out yourself.</li>
<li>Sentence case, no trailing colon, and it names the value — not the action.</li>
</ul>
<script type="text/babel">
const {Label, Input, Switch} = window.OriginDesignSystem_7c998b;
const {Ic, mount} = window.OriginCard;
function Demo(){return (<>
  <div className="o-stack" style={{gap:8,maxWidth:300}}><Label htmlFor="n">Full name</Label><Input id="n" placeholder="Rick Astley" /></div>
  <div className="o-row" style={{justifyContent:"space-between",maxWidth:300}}><Label htmlFor="buf">Add buffer time</Label><Switch id="buf" defaultChecked /></div>
</>)}
mount(<Demo />);
</script>
</body></html>