{
  "component": {
    "id": "form-field",
    "name": "Email input",
    "tier": "free",
    "exampleId": "form-field",
    "access": "free",
    "requiresAuthorization": false
  },
  "source": {
    "demoModule": "src/core-demos.tsx",
    "exportName": "FieldDemo",
    "sha256": "34e593b768c597eaefc189596a759f9a0991690d2688ecf591eaf94ed0c8df1d",
    "helperImports": [],
    "directComponentImports": [
      "form-field",
      "tidal-button"
    ],
    "sampleBoundary": "Existing local demo fixture with fictional data and callbacks. No live service, customer data, access key, or Pro source is included."
  },
  "install": {
    "command": "npx shadcn@latest add https://tidalui.com/r/form-field.json",
    "registryUrl": "https://tidalui.com/r/form-field.json",
    "access": "free",
    "sourceDelivery": "public-registry",
    "requiresAuthorization": false,
    "tokenSource": "none",
    "cli": {
      "package": "shadcn",
      "requested": "latest"
    }
  },
  "installPlan": [
    {
      "order": 1,
      "kind": "primary",
      "dependency": "https://tidalui.com/r/form-field.json",
      "purpose": "component",
      "command": "npx shadcn@latest add https://tidalui.com/r/form-field.json",
      "registryUrl": "https://tidalui.com/r/form-field.json",
      "access": "free",
      "sourceDelivery": "public-registry",
      "requiresAuthorization": false
    },
    {
      "order": 2,
      "kind": "demo-only-additional",
      "dependency": "https://tidalui.com/r/tidal-button.json",
      "purpose": "complete-example-demo-dependency",
      "command": "npx shadcn@latest add https://tidalui.com/r/tidal-button.json",
      "registryUrl": "https://tidalui.com/r/tidal-button.json",
      "access": "free",
      "sourceDelivery": "public-registry",
      "requiresAuthorization": false
    }
  ],
  "imports": {
    "componentPath": "components/ui/form-field.tsx",
    "exports": [
      "TidalButton",
      "TidalField"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/form-field.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [
      "lucide-react"
    ],
    "registry": [],
    "additionalRegistry": [
      "https://tidalui.com/r/tidal-button.json"
    ],
    "installClosure": [
      "form-field",
      "tidal-button"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/form-field.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/form-field.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/demo-styles.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "import \"./components/ui/tidal.css\";\n\nimport { useState, useRef } from \"react\";\n\nimport { ArrowUpRight, Check, Mail } from \"lucide-react\";\n\nimport { TidalField } from \"./components/ui/form-field\";\n\nimport \"./components/ui/form-field.css\";\n\nimport { TidalButton } from \"./components/ui/tidal-button\";\n\n\n\nconst tidalExampleStyles = \".field-specimen{padding:24px;background:var(--t-surface);border:1px solid var(--t-border);border-radius:var(--t-radius-card);box-shadow:0 10px 20px -12px #00000026,0 1px 2px #00000008;width:100%;max-width:330px}.field-specimen>.demo-eyebrow{display:block;font-size:11px;margin-bottom:10px}.field-specimen>h3{font-size:22px;letter-spacing:-.8px;color:var(--t-ink);margin-bottom:24px}.field-specimen>.tidal-button{margin-top:20px;width:100%;font-size:11px}\";\n\nexport function FieldDemo() {\n  const [email, setEmail] = useState(\"\");\n  const [error, setError] = useState(\"\");\n  const [done, setDone] = useState(false);\n  const field = useRef<HTMLInputElement>(null);\n  return (\n    <form\n      className=\"field-specimen\"\n      noValidate\n      onSubmit={(e) => {\n        e.preventDefault();\n        if (!/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$/.test(email)) {\n          setError(\"Enter a valid work email.\");\n          setDone(false);\n          field.current?.focus({ preventScroll: true });\n        } else {\n          setError(\"\");\n          setDone(true);\n        }\n      }}\n    >\n      <TidalField\n        ref={field}\n        required\n        label=\"Work email\"\n        type=\"email\"\n        autoComplete=\"email\"\n        value={email}\n        onChange={(e) => {\n          setEmail(e.target.value);\n          setError(\"\");\n          setDone(false);\n        }}\n        placeholder=\"you@company.com\"\n        description=\"Just a demo. Nothing leaves this page.\"\n        error={error}\n        leading={<Mail size={15} />}\n      />\n      <TidalButton type=\"submit\">\n        {done ? <Check size={15} /> : null}\n        {done ? \"You’re all set\" : \"Continue\"}{\" \"}\n        {!done ? <ArrowUpRight size={15} /> : null}\n      </TidalButton>\n    </form>\n  );\n}\n\nexport default function AgentExample() {\n  return (\n    <div className=\"tidal-scope\" data-theme=\"light\" dir=\"ltr\">\n      <style>{tidalExampleStyles}</style>\n      <FieldDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/form-field.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [
    {
      "prop": "value",
      "type": "inferred-from-existing-demo",
      "initial": "\"\"",
      "setter": "setEmail",
      "proposalCanBeRejected": false
    },
    {
      "prop": "error",
      "type": "inferred-from-existing-demo",
      "initial": "\"\"",
      "setter": "setError",
      "proposalCanBeRejected": false
    }
  ],
  "events": [
    {
      "name": "onChange",
      "nativeType": "React synthetic event or native callback",
      "callerFirst": true,
      "preventable": false,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    },
    {
      "name": "onSubmit",
      "nativeType": "React synthetic event or native callback",
      "callerFirst": true,
      "preventable": false,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    }
  ],
  "nativeForm": {
    "participates": true,
    "names": [],
    "expectedFormData": {},
    "submitBehavior": "The existing demo's native form callback receives the submit event.",
    "resetBehavior": "Native reset behavior remains available where the demo renders a resettable control.",
    "disabledBehavior": "Disabled controls remain excluded from successful native form submission.",
    "readOnlyBehavior": "Read-only controls retain their value and remain inspectable by the consumer."
  },
  "accessibility": {
    "labelSource": "Existing demo label or ARIA prop",
    "semantics": "Preserve the component's native element and the semantics demonstrated by the source fixture.",
    "keyboard": [
      "Tab and Shift+Tab",
      "Enter or Space for native activation",
      "Arrow keys where the component exposes a composite control"
    ],
    "focusReturn": "Preserve browser focus order and visible focus.",
    "errorAnnouncement": "The existing error or alert path remains consumer-owned and should be announced by the rendered semantics.",
    "reducedMotion": "Verify prefers-reduced-motion with the existing component transition path.",
    "forcedColors": "Verify visible borders, text, and focus in forced-colors mode."
  },
  "responsive": {
    "widths": [
      320,
      390,
      768,
      1260
    ],
    "shortViewport": "Check the example at a 300px viewport height with keyboard or portal content visible.",
    "overflow": "The page should not gain horizontal overflow; component-local scrolling must remain intentional.",
    "touchTargetMinPx": 44,
    "coarseInputFontPx": 16
  },
  "errors": [
    {
      "fixture": "Exercise the existing demo's error, empty, loading, or invalid fixture.",
      "visibleResult": "The consumer-visible result must remain explicit and must not be replaced by a silent console error.",
      "focusResult": "Focus must remain on the triggering control or move to the announced error according to the native pattern.",
      "ownership": "Consumer-owned sample state only; no network request or customer data is used."
    }
  ],
  "verification": {
    "commands": [
      "npx tsc --noEmit",
      "npx vite build"
    ],
    "lockfile": "Use the consumer project's committed lockfile.",
    "browser": [
      "Chromium 1260x800",
      "Chromium 390x844",
      "Keyboard and reduced-motion pass"
    ]
  },
  "validation": {
    "consumerFixture": {
      "tsc": "pass",
      "viteBuild": "pass",
      "resourceModel": "Generated usage plus only the component files and CSS delivered by the primary item and listed registry dependencies."
    },
    "registryArtifact": "present-local"
  },
  "exceptions": []
}
