Spectrum Components API

Schema version: 6.0.0

Combo box

Combo boxes combine a text entry with a picker menu, allowing users to filter longer lists to only the selections matching a query.

PropertyValuesDefault valueRequired
label
text
-
label position
top / side / in line
top
value
text
-
width
yes / no
nono
size
s / m / l / xl
m
is required
yes / no
no
necessity indicator
text / icon
icon
has autocomplete
yes / no
no
menu trigger
input / focus / manual
input
is error
yes / no
no
is disabled
yes / no
no
is read only
yes / no
no
description
text
-
error message
text
-
state
default / hover (text area) / hover (button area) / focus + hover / focus + not hover / keyboard focus
default
{
  "slug": "combo-box",
  "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/component.json",
  "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/components/combo-box.json",
  "title": "Combo box",
  "description": "Combo boxes combine a text entry with a picker menu, allowing users to filter longer lists to only the selections matching a query.",
  "meta": {
    "category": "inputs",
    "documentationUrl": "https://spectrum.adobe.com/page/combo-box/"
  },
  "type": "object",
  "properties": {
    "label": {
      "type": "string"
    },
    "labelPosition": {
      "type": "string",
      "enum": [
        "top",
        "side",
        "in line"
      ],
      "default": "top"
    },
    "value": {
      "type": "string"
    },
    "width": {
      "type": "number"
    },
    "size": {
      "type": "string",
      "enum": [
        "s",
        "m",
        "l",
        "xl"
      ],
      "default": "m"
    },
    "isRequired": {
      "type": "boolean",
      "default": false
    },
    "necessityIndicator": {
      "type": "string",
      "enum": [
        "text",
        "icon"
      ],
      "default": "icon"
    },
    "hasAutocomplete": {
      "type": "boolean",
      "default": false
    },
    "menuTrigger": {
      "type": "string",
      "enum": [
        "input",
        "focus",
        "manual"
      ],
      "default": "input"
    },
    "isError": {
      "type": "boolean",
      "default": false
    },
    "isDisabled": {
      "type": "boolean",
      "default": false
    },
    "isReadOnly": {
      "type": "boolean",
      "default": false
    },
    "description": {
      "type": "string"
    },
    "errorMessage": {
      "type": "string"
    },
    "state": {
      "type": "string",
      "enum": [
        "default",
        "hover (text area)",
        "hover (button area)",
        "focus + hover",
        "focus + not hover",
        "keyboard focus"
      ],
      "default": "default"
    }
  }
}
← Back to home