{
  "component": {
    "id": "tidal-button",
    "name": "Button",
    "tier": "free",
    "exampleId": "tidal-button",
    "access": "free",
    "requiresAuthorization": false
  },
  "source": {
    "demoModule": "src/core-demos.tsx",
    "exportName": "ButtonDemo",
    "sha256": "3a99148fe46054191b8c7f04dd9352af19a97dde012b1f22448d4ddd1196f3d0",
    "helperImports": [],
    "directComponentImports": [
      "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/tidal-button.json",
    "registryUrl": "https://tidalui.com/r/tidal-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/tidal-button.json",
      "purpose": "component",
      "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/tidal-button.tsx",
    "exports": [
      "TidalButton"
    ],
    "stylesheets": [
      "components/ui/tidal.css"
    ],
    "scopeClass": "tidal-scope"
  },
  "dependencies": {
    "npm": [
      "lucide-react"
    ],
    "registry": [],
    "additionalRegistry": [],
    "installClosure": [
      "tidal-button"
    ],
    "css": [
      "components/ui/tidal.css"
    ],
    "demoCss": [],
    "consumerOwned": [
      "react",
      "react-dom"
    ]
  },
  "files": {
    "sourceFile": "/examples/tidal-button.tsx",
    "demoStyles": [],
    "inlinedDemoStyles": [
      "src/styles.css",
      "src/monochrome.css"
    ],
    "assets": []
  },
  "example": {
    "language": "tsx",
    "source": "import \"./components/ui/tidal.css\";\n\nimport { useState, useRef, useEffect, useLayoutEffect } from \"react\";\n\nimport { ArrowUpRight, Check, Plus } from \"lucide-react\";\n\nimport { TidalButton } from \"./components/ui/tidal-button\";\n\n\n\nconst tidalExampleStyles = \".button-specimen{width:100%;max-width:320px;background:linear-gradient(150deg,var(--t-surface),var(--t-subtle));border:1px solid var(--t-border);border-radius:18px;padding:18px;box-shadow:0 10px 20px -10px #0000001a,0 1px 2px #00000008}\\n.button-arrangement{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:8px;padding:23px 0 18px}\\n.button-arrangement .tidal-button{font-size:10px;padding:0 12px}\\n.specimen-bottomline{display:flex;align-items:center;justify-content:space-between;font-size:8px;color:var(--t-muted);gap:6px}\\n.specimen-bottomline kbd{font:11px ui-monospace,monospace;border:1px solid var(--t-border);border-radius:5px;padding:3px 5px;color:var(--t-muted);white-space:nowrap}\";\n\nexport function ButtonDemo() {\n  const [state, setState] = useState<\"idle\" | \"loading\" | \"saved\">(\"idle\");\n  const timer = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);\n  const saveButton = useRef<HTMLButtonElement>(null);\n  const focusOwner = useRef<HTMLElement | null>(null);\n  useEffect(() => () => clearTimeout(timer.current), []);\n  useLayoutEffect(() => {\n    if (state !== \"saved\" || !focusOwner.current) return;\n    const active = document.activeElement;\n    if (active === document.body || active === focusOwner.current)\n      saveButton.current?.focus({ preventScroll: true });\n    focusOwner.current = null;\n  }, [state]);\n  function reset() {\n    clearTimeout(timer.current);\n    setState(\"idle\");\n  }\n  return (\n    <div className=\"button-specimen\">\n      <div className=\"button-arrangement\">\n        <TidalButton\n          ref={saveButton}\n          loading={state === \"loading\"}\n          onClick={(event) => {\n            clearTimeout(timer.current);\n            focusOwner.current = event.currentTarget;\n            setState(\"loading\");\n            timer.current = setTimeout(() => setState(\"saved\"), 650);\n          }}\n        >\n          {state === \"saved\" ? <Check size={16} /> : null}\n          {state === \"saved\" ? \"Changes saved\" : \"Save changes\"}\n        </TidalButton>\n        <TidalButton variant=\"secondary\" onClick={reset}>\n          Reset <ArrowUpRight size={16} />\n        </TidalButton>\n        <TidalButton\n          variant=\"ghost\"\n          onClick={() => {\n            clearTimeout(timer.current);\n            setState(\"saved\");\n          }}\n        >\n          <Plus size={16} />\n          Add to project\n        </TidalButton>\n      </div>\n      <div className=\"specimen-bottomline\">\n        <span>Hover and press.</span>\n        <kbd>↵</kbd>\n      </div>\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      <ButtonDemo />\n    </div>\n  );\n}\n",
    "sourceFile": "/examples/tidal-button.tsx",
    "fixtureData": "Existing demo fixture data only; replace with consumer-owned data before production use."
  },
  "controlledState": [],
  "events": [
    {
      "name": "onClick",
      "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": 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": "Consumer-provided label remains required where the component API requires one.",
    "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": "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": []
}
