{
  "component": {
    "id": "toggle-switch",
    "name": "Toggle switch",
    "tier": "pro",
    "exampleId": "toggle-switch",
    "access": "pro",
    "requiresAuthorization": true
  },
  "source": {
    "demoModule": "src/core-demos.tsx",
    "exportName": "SwitchDemo",
    "sha256": "c38f2a8f6c2241d352fc5b2e7cfe29d705d3629202c41cb0ba29553579654532",
    "helperImports": [],
    "directComponentImports": [
      "toggle-switch"
    ],
    "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 @tidal-pro/toggle-switch",
    "registryUrl": "https://tidalui.com/r/pro/toggle-switch.json",
    "namespace": "@tidal-pro",
    "access": "pro",
    "sourceDelivery": "server-gated",
    "requiresAuthorization": true,
    "tokenSource": "local-env",
    "tokenEnvName": "TIDALUI_TOKEN",
    "cli": {
      "package": "shadcn",
      "requested": "latest"
    }
  },
  "installPlan": [
    {
      "order": 1,
      "kind": "primary",
      "dependency": "@tidal-pro/toggle-switch",
      "purpose": "component",
      "command": "npx shadcn@latest add @tidal-pro/toggle-switch",
      "registryUrl": "https://tidalui.com/r/pro/toggle-switch.json",
      "access": "pro",
      "sourceDelivery": "server-gated",
      "requiresAuthorization": true
    }
  ],
  "imports": {
    "componentPath": "components/ui/toggle-switch.tsx",
    "exports": [
      "TidalSwitch"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/toggle-switch.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [],
    "registry": [],
    "additionalRegistry": [],
    "installClosure": [
      "toggle-switch"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/toggle-switch.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/toggle-switch.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/demo-styles.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "import \"./components/ui/tidal.css\";\n\nimport { TidalSwitch } from \"./components/ui/toggle-switch\";\n\nimport \"./components/ui/toggle-switch.css\";\n\nimport { useState } from \"react\";\n\n\n\nconst tidalExampleStyles = \".switch-specimen{width:100%;max-width:370px;padding:26px;background:var(--t-surface);border:1px solid var(--t-border);border-radius:var(--t-radius-card);box-shadow:0 12px 24px -14px #00000026,0 1px 2px #00000008}.switch-specimen>.demo-eyebrow{font-size:11px}.switch-specimen>h3{font-size:23px;letter-spacing:-.8px;margin:12px 0 9px;color:var(--t-ink)}.switch-specimen>p{font-size:11px;color:var(--t-muted);line-height:1.6}.switch-demo-rows{margin-top:22px}.switch-demo-rows>.tidal-switch{padding:14px 0;border-top:1px solid var(--t-border)}.switch-specimen>.switch-demo-status{font-size:11px;margin-bottom:0}\";\n\nexport function SwitchDemo() {\n  const [email, setEmail] = useState(true);\n  const [digest, setDigest] = useState(false);\n  return (\n    <div className=\"switch-specimen\">\n      <div className=\"switch-demo-rows\">\n        <TidalSwitch\n          label=\"Project updates\"\n          description=\"Receive project activity by email.\"\n          checked={email}\n          onCheckedChange={setEmail}\n          name=\"projectUpdates\"\n        />\n        <TidalSwitch\n          label=\"Weekly digest\"\n          description=\"Receive a weekly activity summary.\"\n          checked={digest}\n          onCheckedChange={setDigest}\n          name=\"weeklyDigest\"\n        />\n        <TidalSwitch\n          label=\"Security notices\"\n          description=\"Required security alerts.\"\n          checked={true}\n          onCheckedChange={() => {}}\n          disabled\n        />\n      </div>\n      <p className=\"switch-demo-status\" role=\"status\">\n        {email ? \"Project updates on\" : \"Project updates off\"} ·{\" \"}\n        {digest ? \"Digest on\" : \"Digest off\"}\n      </p>\n    </div>\n  );\n}\n\nexport default function AgentExample() {\n  return (\n    <div className=\"tidal-scope\" data-theme=\"light\" dir=\"ltr\">\n      <style>{tidalExampleStyles}</style>\n      <SwitchDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/toggle-switch.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [
    {
      "prop": "checked",
      "type": "inferred-from-existing-demo",
      "initial": "true",
      "setter": "setEmail",
      "proposalCanBeRejected": false
    }
  ],
  "events": [
    {
      "name": "onCheckedChange",
      "nativeType": "component 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": [
      "projectUpdates",
      "weeklyDigest"
    ],
    "expectedFormData": {
      "projectUpdates": "fixture value",
      "weeklyDigest": "fixture value"
    },
    "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": "No error fixture is exposed by the existing demo; inject a consumer-owned failure state before production use.",
      "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": "server-gated"
  },
  "exceptions": []
}
