{
  "format": "ui-contract-component-draft",
  "id": "shadcn:Switch",
  "version": "0.4.1",
  "status": "complete",
  "domains": {
    "interface": "interface.json",
    "visual": {
      "tokens": "../../tokens.json",
      "css": "layout.css"
    },
    "behavior": "behavior.scxml",
    "accessibility": {
      "html": "accessibility.html",
      "rules": "accessibility.rules.json"
    }
  },
  "anatomy": {
    "field": "Optional labelled field layout.",
    "control": "Actual span role=switch source root.",
    "thumb": "Actual source thumb with directional checked travel."
  },
  "stories": "stories.json",
  "ux": "ux.json",
  "convention": "semantic-component/1",
  "partBindings": {
    "field": {
      "kind": "element",
      "declaration": "Switch",
      "selector": "[data-part=\"switch-field\"]",
      "description": "Optional labelled field layout.",
      "ownership": "explicit caller composition"
    },
    "control": {
      "kind": "element",
      "declaration": "Switch",
      "selector": "[data-slot=\"switch\"]",
      "description": "Actual span role=switch source root.",
      "ownership": "actual wrapper"
    },
    "thumb": {
      "kind": "element",
      "declaration": "Switch",
      "selector": "[data-slot=\"switch-thumb\"]",
      "description": "Actual source thumb with directional checked travel.",
      "ownership": "actual wrapper"
    }
  },
  "visualContract": {
    "tokens": {
      "color-background": "semantic.color.background",
      "color-input": "semantic.color.input",
      "color-primary": "semantic.color.primary",
      "color-ring": "semantic.color.ring",
      "control-label-gap": "semantic.layout.controlLabelGap",
      "switch-disabled-opacity": "switch.disabledOpacity",
      "switch-focus-width": "switch.focusWidth",
      "switch-height": "switch.height",
      "switch-inset": "switch.inset",
      "switch-radius": "switch.radius",
      "switch-small-height": "switch.smallHeight",
      "switch-small-thumb": "switch.smallThumb",
      "switch-small-width": "switch.smallWidth",
      "switch-thumb": "switch.thumb",
      "switch-width": "switch.width"
    },
    "runtimeProperties": {},
    "layoutPolicy": "Default track 32×18px/thumb 16px and small track 24×14px/thumb 12px retain the native semantic sizes. Thumb travel derives from track minus thumb minus two 1px insets, including RTL. An explicit optional caller field owns label arrangement. Native checked/disabled/focus states remain independent from label content; no imported fixed specimen position or synthetic value event is used.",
    "variants": {
      "size": {
        "prop": "size",
        "attribute": "data-size",
        "values": [
          "default",
          "sm"
        ]
      },
      "checked": {
        "prop": "checked",
        "attribute": "data-checked"
      },
      "direction": {
        "prop": "dir",
        "values": [
          "ltr",
          "rtl"
        ]
      }
    },
    "sourceTraceability": "figma/traceability.json"
  }
}
