{
  "component": {
    "id": "toggle-button",
    "name": "Toggle button",
    "tier": "free",
    "exampleId": "toggle-button",
    "access": "free",
    "requiresAuthorization": false
  },
  "source": {
    "demoModule": "src/toggle-button-demo.tsx",
    "exportName": "ToggleButtonDemo",
    "sha256": "efcf2b765a5437931347aab7c3cafb0efa539fa37ed32e3fe2117bd12a14c378",
    "helperImports": [],
    "directComponentImports": [
      "toggle-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/toggle-button.json",
    "registryUrl": "https://tidalui.com/r/toggle-button.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/toggle-button.json",
      "purpose": "component",
      "command": "npx shadcn@latest add https://tidalui.com/r/toggle-button.json",
      "registryUrl": "https://tidalui.com/r/toggle-button.json",
      "access": "free",
      "sourceDelivery": "public-registry",
      "requiresAuthorization": false
    }
  ],
  "imports": {
    "componentPath": "components/ui/toggle-button.tsx",
    "exports": [
      "TidalToggleButton"
    ],
    "stylesheets": [
      "components/ui/tidal.css",
      "components/ui/toggle-button.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [
      "lucide-react"
    ],
    "registry": [],
    "additionalRegistry": [],
    "installClosure": [
      "toggle-button"
    ],
    "css": [
      "components/ui/tidal.css",
      "components/ui/toggle-button.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/toggle-button.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/toggle-button-demo.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "\"use client\";\n\nimport \"./components/ui/tidal.css\";\n\nimport { useState } from \"react\";\n\nimport { Bookmark, Rows3 } from \"lucide-react\";\n\nimport { TidalToggleButton } from \"./components/ui/toggle-button\";\n\nimport \"./components/ui/toggle-button.css\";\n\n\n\nconst tidalExampleStyles = \".tidal-scope .toggle-button-demo {\\n  display: flex;\\n  width: min(100%, 420px);\\n  min-width: 0;\\n  margin-inline: auto;\\n  flex-direction: column;\\n  align-items: center;\\n  justify-content: center;\\n  gap: 12px;\\n}\\n\\n.tidal-scope .toggle-button-demo-actions {\\n  display: flex;\\n  min-width: 0;\\n  flex-wrap: wrap;\\n  align-items: center;\\n  justify-content: center;\\n  gap: 10px;\\n}\\n\\n.tidal-scope .toggle-button-demo > p {\\n  min-width: 0;\\n  margin: 0;\\n  color: var(--t-muted);\\n  font-size: 11px;\\n  line-height: 1.45;\\n  text-align: center;\\n  overflow-wrap: anywhere;\\n}\";\n\nexport function ToggleButtonDemo() {\n  const [compact, setCompact] = useState(false);\n  const [bookmarked, setBookmarked] = useState(true);\n\n  return (\n    <section className=\"toggle-button-demo\" aria-label=\"Toggle button preview\">\n      <div\n        className=\"toggle-button-demo-actions\"\n        role=\"group\"\n        aria-label=\"View options\"\n      >\n        <TidalToggleButton\n          label=\"Compact view\"\n          icon={<Rows3 size={18} aria-hidden=\"true\" />}\n          pressed={compact}\n          onPressedChange={setCompact}\n        />\n        <TidalToggleButton\n          label=\"Bookmark component\"\n          icon={<Bookmark size={18} aria-hidden=\"true\" />}\n          iconOnly\n          pressed={bookmarked}\n          onPressedChange={setBookmarked}\n        />\n      </div>\n      <p role=\"status\" aria-live=\"polite\">\n        {compact ? \"Compact\" : \"Comfortable\"} view ·{\" \"}\n        {bookmarked ? \"Bookmarked\" : \"Not bookmarked\"}\n      </p>\n    </section>\n  );\n}\n\nexport default function AgentExample() {\n  return (\n    <div className=\"tidal-scope\" data-theme=\"light\" dir=\"ltr\">\n      <style>{tidalExampleStyles}</style>\n      <ToggleButtonDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/toggle-button.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [
    {
      "prop": "pressed",
      "type": "inferred-from-existing-demo",
      "initial": "false",
      "setter": "setCompact",
      "proposalCanBeRejected": false
    }
  ],
  "events": [
    {
      "name": "onPressedChange",
      "nativeType": "component callback",
      "callerFirst": true,
      "preventable": true,
      "observedResult": "The existing demo callback remains the source of truth; this example does not call a live service."
    }
  ],
  "nativeForm": {
    "participates": false,
    "names": [],
    "expectedFormData": {},
    "submitBehavior": "No form submit is present in the existing demo.",
    "resetBehavior": "No reset control is present in the existing demo.",
    "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": "No error announcement path is present in this demo; the consumer owns validation messaging.",
    "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": "present-local"
  },
  "exceptions": []
}
