Spectrum Components API

Schema version: 6.0.0

Field label

Field labels give context to the information that a user needs to input. They're commonly used in forms.

PropertyValuesDefault valueRequired
label
text
-
label position
top / side
top
size
s / m / l / xl
m
necessity indicator
text / icon
icon
is required
yes / no
no
is disabled
yes / no
no
{
  "slug": "field-label",
  "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/component.json",
  "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/components/field-label.json",
  "title": "Field label",
  "description": "Field labels give context to the information that a user needs to input. They're commonly used in forms.",
  "meta": {
    "category": "inputs",
    "documentationUrl": "https://spectrum.adobe.com/page/field-label/"
  },
  "type": "object",
  "properties": {
    "label": {
      "type": "string"
    },
    "labelPosition": {
      "type": "string",
      "enum": [
        "top",
        "side"
      ],
      "default": "top"
    },
    "size": {
      "type": "string",
      "enum": [
        "s",
        "m",
        "l",
        "xl"
      ],
      "default": "m"
    },
    "necessityIndicator": {
      "type": "string",
      "enum": [
        "text",
        "icon"
      ],
      "default": "icon"
    },
    "isRequired": {
      "type": "boolean",
      "default": false
    },
    "isDisabled": {
      "type": "boolean",
      "default": false
    }
  }
}
← Back to home