Spectrum Components API

Schema version: 6.0.0

Help text

Help text provides either an informative description or an error message that gives more context about what a user needs to input. It’s commonly used in forms.

PropertyValuesDefault valueRequired
text
text
-
variant
neutral / negative
neutral
hide icon
yes / no
Only applicable if variant is negative.
no
size
s / m / l / xl
m
is disabled
yes / no
Help text cannot be both disabled and negative variant.
no
{
  "slug": "help-text",
  "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/component.json",
  "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/components/help-text.json",
  "title": "Help text",
  "description": "Help text provides either an informative description or an error message that gives more context about what a user needs to input. It’s commonly used in forms.",
  "meta": {
    "category": "inputs",
    "documentationUrl": "https://spectrum.adobe.com/page/help-text/"
  },
  "type": "object",
  "properties": {
    "text": {
      "type": "string"
    },
    "variant": {
      "type": "string",
      "enum": [
        "neutral",
        "negative"
      ],
      "default": "neutral"
    },
    "hideIcon": {
      "type": "boolean",
      "default": false,
      "description": "Only applicable if variant is negative."
    },
    "size": {
      "type": "string",
      "enum": [
        "s",
        "m",
        "l",
        "xl"
      ],
      "default": "m"
    },
    "isDisabled": {
      "type": "boolean",
      "default": false,
      "description": "Help text cannot be both disabled and negative variant."
    }
  }
}
← Back to home