{
  "format": "ui-contract-component-draft",
  "id": "shadcn:Combobox",
  "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": {
    "root": "Direct Root alias owns value/query/highlight/open; it does not create a wrapper DOM.",
    "input-frame": "Actual InputGroup wrapper; not the native text input.",
    "input": "Actual primitive Input renders InputGroupInput; real slot belongs delegated InputGroup.",
    "trigger": "Explicit exported Trigger with chosen visible/accessible name; automatic icon trigger is not falsely renamed.",
    "clear": "Named BaseUI Primitive.Clear composition because private shadcn Clear wrapper is not exported.",
    "popup": "Actual Popup is presentation for outside-input usage; query focus remains input.",
    "list": "Actual listbox/active-descendant context.",
    "item": "Actual option; highlight distinct from selected commit.",
    "indicator": "Actual private selected indicator.",
    "group": "Actual source Group.",
    "label": "Actual GroupLabel, not input field label.",
    "empty": "Actual polite no-results output.",
    "separator": "Actual source separator.",
    "chips": "Actual multiple-value wrapping container.",
    "chip": "Actual selected token with source keyboard behavior.",
    "chip-input": "Actual second-instance native combobox input in multiple mode.",
    "chip-remove": "Named BaseUI Primitive.ChipRemove composed with showRemove=false.",
    "value": "Context value renderer has no promised stable styled DOM; public value API remains source-bound.",
    "collection": "Collection data renderer/context; no fabricated DOM collection part.",
    "anchor": "Exported React ref hook for a real chosen Positioner anchor; not a DOM part."
  },
  "stories": "stories.json",
  "ux": "ux.json",
  "composition": {
    "button": {
      "component": "../button/component.json"
    },
    "input-group": {
      "component": "../input-group/component.json"
    }
  },
  "convention": "semantic-component/1",
  "partBindings": {
    "root": {
      "kind": "controller",
      "declaration": "Combobox",
      "source": "Direct Root alias owns value/query/highlight/open; it does not create a wrapper DOM.",
      "description": "Direct Root alias owns value/query/highlight/open; it does not create a wrapper DOM."
    },
    "input-frame": {
      "kind": "element",
      "declaration": "ComboboxInput",
      "selector": ".cn-combobox-input",
      "description": "Actual InputGroup wrapper; not the native text input.",
      "ownership": "actual source wrapper"
    },
    "input": {
      "kind": "element",
      "declaration": "ComboboxInput",
      "selector": ".cn-combobox-input input[data-slot=\"input-group-control\"]",
      "description": "Actual primitive Input renders InputGroupInput; real slot belongs delegated InputGroup.",
      "ownership": "actual source wrapper"
    },
    "trigger": {
      "kind": "element",
      "declaration": "ComboboxTrigger",
      "selector": "[data-slot=\"combobox-trigger\"]",
      "description": "Explicit exported Trigger with chosen visible/accessible name; automatic icon trigger is not falsely renamed.",
      "ownership": "actual source wrapper"
    },
    "clear": {
      "kind": "element",
      "declaration": "ComboboxInput",
      "selector": "[data-part=\"combobox-clear\"]",
      "description": "Named BaseUI Primitive.Clear composition because private shadcn Clear wrapper is not exported.",
      "ownership": "caller composition"
    },
    "popup": {
      "kind": "element",
      "declaration": "ComboboxContent",
      "selector": "[data-slot=\"combobox-content\"]",
      "description": "Actual Popup is presentation for outside-input usage; query focus remains input.",
      "ownership": "actual source wrapper"
    },
    "list": {
      "kind": "element",
      "declaration": "ComboboxList",
      "selector": "[data-slot=\"combobox-list\"]",
      "description": "Actual listbox/active-descendant context.",
      "ownership": "actual source wrapper"
    },
    "item": {
      "kind": "element",
      "declaration": "ComboboxItem",
      "selector": "[data-slot=\"combobox-item\"]",
      "description": "Actual option; highlight distinct from selected commit.",
      "ownership": "actual source wrapper"
    },
    "indicator": {
      "kind": "element",
      "declaration": "ComboboxItem",
      "selector": ".cn-combobox-item-indicator",
      "description": "Actual private selected indicator.",
      "ownership": "actual source wrapper"
    },
    "group": {
      "kind": "element",
      "declaration": "ComboboxGroup",
      "selector": "[data-slot=\"combobox-group\"]",
      "description": "Actual source Group.",
      "ownership": "actual source wrapper"
    },
    "label": {
      "kind": "element",
      "declaration": "ComboboxLabel",
      "selector": "[data-slot=\"combobox-label\"]",
      "description": "Actual GroupLabel, not input field label.",
      "ownership": "actual source wrapper"
    },
    "empty": {
      "kind": "element",
      "declaration": "ComboboxEmpty",
      "selector": "[data-slot=\"combobox-empty\"]",
      "description": "Actual polite no-results output.",
      "ownership": "actual source wrapper"
    },
    "separator": {
      "kind": "element",
      "declaration": "ComboboxSeparator",
      "selector": "[data-slot=\"combobox-separator\"]",
      "description": "Actual source separator.",
      "ownership": "actual source wrapper"
    },
    "chips": {
      "kind": "element",
      "declaration": "ComboboxChips",
      "selector": "[data-slot=\"combobox-chips\"]",
      "description": "Actual multiple-value wrapping container.",
      "ownership": "actual source wrapper"
    },
    "chip": {
      "kind": "element",
      "declaration": "ComboboxChip",
      "selector": "[data-slot=\"combobox-chip\"]",
      "description": "Actual selected token with source keyboard behavior.",
      "ownership": "actual source wrapper"
    },
    "chip-input": {
      "kind": "element",
      "declaration": "ComboboxChipsInput",
      "selector": "[data-slot=\"combobox-chip-input\"]",
      "description": "Actual second-instance native combobox input in multiple mode.",
      "ownership": "actual source wrapper"
    },
    "chip-remove": {
      "kind": "element",
      "declaration": "ComboboxChip",
      "selector": "[data-part=\"combobox-chip-remove\"]",
      "description": "Named BaseUI Primitive.ChipRemove composed with showRemove=false.",
      "ownership": "caller composition"
    },
    "value": {
      "kind": "controller",
      "declaration": "ComboboxValue",
      "source": "Context value renderer has no promised stable styled DOM; public value API remains source-bound.",
      "description": "Context value renderer has no promised stable styled DOM; public value API remains source-bound."
    },
    "collection": {
      "kind": "controller",
      "declaration": "ComboboxCollection",
      "source": "Collection data renderer/context; no fabricated DOM collection part.",
      "description": "Collection data renderer/context; no fabricated DOM collection part."
    },
    "anchor": {
      "kind": "controller",
      "declaration": "useComboboxAnchor",
      "source": "Exported React ref hook for a real chosen Positioner anchor; not a DOM part.",
      "description": "Exported React ref hook for a real chosen Positioner anchor; not a DOM part."
    }
  },
  "visualContract": {
    "tokens": {
      "border-width": "semantic.border.width",
      "color-background": "semantic.color.background",
      "color-border": "semantic.color.border",
      "color-foreground": "semantic.color.foreground",
      "color-muted": "semantic.color.muted",
      "color-muted-foreground": "semantic.color.mutedForeground",
      "color-ring": "semantic.color.ring",
      "combobox-chip-gap": "components.combobox.chipGap",
      "combobox-chip-height": "components.combobox.chipHeight",
      "combobox-chip-radius": "components.combobox.chipRadius",
      "combobox-height": "components.combobox.height",
      "combobox-input-minimum": "components.combobox.inputMinimum",
      "combobox-list-height": "components.combobox.listHeight",
      "combobox-radius": "components.combobox.radius",
      "focus-shadow": "semantic.focus.shadow",
      "focus-spread": "semantic.focus.spread",
      "font-fallback": "semantic.typography.fallbackFamily",
      "font-family": "semantic.typography.fontFamily",
      "font-size-body": "semantic.typography.bodySize",
      "line-height-body": "semantic.typography.bodyLineHeight",
      "menu-maximum-width": "components.menu.maximumWidth"
    },
    "runtimeProperties": {
      "--anchor-width": {
        "source": "BaseUI Combobox.Positioner measured chosen anchor",
        "purpose": "Minimum popup size follows actual field/chips anchor while available width bounds it."
      },
      "--available-width": {
        "source": "BaseUI Combobox.Positioner collision geometry",
        "purpose": "Popup remains bounded in a narrow viewport."
      }
    },
    "layoutPolicy": "ComboboxInput wraps InputGroup; its actual native input slot is input-group-control, not an invented combobox-input. Source defaults showTrigger=true/showClear=false, but this reference deliberately composes named exported Trigger and named BaseUI Clear/ChipRemove with tabIndex 0 and showTrigger/showClear/showRemove disabled, because private icon-only wrappers offer no instance label prop. These helpers are transparent caller compositions, not new shadcn exports. Native input/chips frames are 32px with 10px corners; source popup 10px corner/4px inset, standard 28px minimum rows. Chosen 24px chips/6px corners/4px gaps wrap and remain usable at320px. Shared popup surface/InputGroup styles are explicit transitive dependencies; actual SourceList/option/chip/clear styles remain family-specific. Query highlight and selection/open callbacks stay distinct; source native editing, closed-Escape clear, source no-results and filtering rules are preserved. Open dismissal may reset query to the current selected label; only closed Escape performs the separate selected-value clear transaction. Static fixtures keep primitive roles/active-descendant IDs, with Root/Value/Collection/hook context ownership separate from DOM anatomy. Explicit aria-labelledby points to the real native label because source open-state outside hiding can otherwise remove the implicit HTML-label accessible name; a meaningful error text is linked to the input; The reference passes disabled to both Root and ComboboxInput because the wrapper default disabled=false is passed to its rendered InputGroupInput and can otherwise leave the native input enabled despite the Root lock; readOnly and selected arrays retain source behavior. Portal dir/theme and optional chips anchor belong the real Content/Positioner composition, never native specimen coordinates.",
    "variants": {
      "multiple": {
        "prop": "multiple",
        "valueShape": "array"
      },
      "query": {
        "source": "inputValue/onInputValueChange distinct from selected value"
      },
      "namedAuxiliaryActions": {
        "callerProps": [
          "showTrigger=false",
          "showClear=false",
          "showRemove=false",
          "tabIndex=0"
        ]
      }
    },
    "sourceTraceability": "figma/traceability.json"
  }
}
