{"name":"field","title":"Field","description":"","kind":"component","category":"inputs","status":"beta","props":{"label":{"type":"node","description":"The control's name, above it."},"helper":{"type":"node","description":"Help under the control."},"error":{"type":"node","description":"What to fix; shown while invalid, in place of the helper."},"invalid":{"type":"boolean","default":false,"description":"aria-invalid on the control (its red ring) and the error shown."},"required":{"type":"boolean","default":false,"description":"required on the control; an asterisk after the label."},"disabled":{"type":"boolean","default":false,"description":"Disables the control; the label fades with it."},"readOnly":{"type":"boolean","default":false},"id":{"type":"string","description":"id of the control; generated when omitted."}},"playground":{"name":"Playground","props":{"label":"Billing email","helper":"Invoices and receipts are sent here.","error":"Enter a full email address, like billing@northwind.example.","invalid":false,"required":false,"disabled":false,"readOnly":false},"width":280},"exampleFiles":[{"file":"billing-email","title":"Billing email"},{"file":"email-without-domain","title":"Email without a domain"},{"file":"workspace-id","title":"Workspace ID, read-only"},{"file":"project-description","title":"Project description"},{"file":"create-workspace","title":"Create a workspace"}],"worstCase":[{"name":"Long label and helper","props":{"label":"The email address we should send the weekly supplier report and every invoice to","required":true,"helper":"We send one email every Monday morning with the week's deliveries, the invoices that are due and anything the supplier flagged."},"width":280},{"name":"Long error","props":{"label":"Email","invalid":true,"error":"This address bounced three times last month; check the spelling or ask the supplier for another one before saving."},"width":280},{"name":"Unbreakable text","props":{"label":"supplier-notification-email-address","helper":"bartholomew.fitzgerald@northwind-industries-holdings.example.com"},"width":200},{"name":"Right-to-left","props":{"label":"البريد الإلكتروني","required":true,"helper":"يظهر على لوحة القائمة."},"width":280},{"name":"Narrow","props":{"label":"Email","helper":"Required for invoices."},"width":120}],"anatomy":[{"part":"root","element":"div","description":"Ark's field root (role=\"group\", data-invalid / data-disabled / data-readonly): a column with a 6px gap; class and style land here."},{"part":"label","element":"label","optional":true,"description":"The Label component (data-field=\"label\"), wired to the control (for / id). Only as wide as its text."},{"part":"required-indicator","element":"span","optional":true,"description":"An asterisk after the label text when required, in red, aria-hidden (the control itself carries required)."},{"part":"control","element":"slot","optional":true,"marked":false,"description":"The control (children): Input, Textarea, InputGroup, PasswordInput or any control built on Ark's field context. An Input when omitted."},{"part":"helper","element":"span","optional":true,"description":"Help under the control: text.xs, ink-2 (read for meaning, so at least 4.5:1); wraps, keeps its own direction. Linked by aria-describedby. Hidden while the error shows."},{"part":"error","element":"span","optional":true,"description":"Shown only while invalid and an error is given: text.xs, red, aria-live polite, linked by aria-describedby. It takes the helper's place."}],"slots":{"default":"The control. An Input when omitted."},"states":["invalid","required","disabled","read-only"],"tokens":["color.ink-2","color.red","text.xs"],"a11y":{"role":"group","notes":["The label names the control (for / id), so a click on it focuses the control.","The control's aria-describedby lists the helper, or the error while invalid; the error is aria-live polite.","invalid sets aria-invalid on the control; required sets required (the asterisk is aria-hidden); disabled and readOnly reach the control.","Text sizes and the 16px text on touch come from the control."]},"motion":["none of its own at rest: the control's ring changes as the control's do","error: one that appears after the field's first paint takes its line at once and fades its ink in (opacity over duration.base); on first paint and from the keyboard it is instant"]}