Spectrum Components API

Schema version: 6.0.0

Color slider

A color slider lets users visually change an individual channel of a color.

PropertyValuesDefault valueRequired
background
text
This will vary depending on implementation.
-
channel
hue / saturation / lightness / red / green / blue / alpha
Which channel of the color this slider controls. Use 'alpha' for opacity.
hue
value
yes / no
nono
min value
yes / no
nono
max value
yes / no
nono
step
yes / no
nono
orientation
horizontal / vertical
horizontal
length
yes / no
nono
is disabled
yes / no
no
state
default / hover / down / keyboard focus
default
{
  "slug": "color-slider",
  "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/component.json",
  "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/components/color-slider.json",
  "title": "Color slider",
  "description": "A color slider lets users visually change an individual channel of a color.",
  "meta": {
    "category": "inputs",
    "documentationUrl": "https://spectrum.adobe.com/page/color-slider/"
  },
  "type": "object",
  "properties": {
    "background": {
      "type": "string",
      "description": "This will vary depending on implementation."
    },
    "channel": {
      "type": "string",
      "enum": [
        "hue",
        "saturation",
        "lightness",
        "red",
        "green",
        "blue",
        "alpha"
      ],
      "default": "hue",
      "description": "Which channel of the color this slider controls. Use 'alpha' for opacity."
    },
    "value": {
      "type": "number",
      "description": "Number (from minValue to maxValue)."
    },
    "minValue": {
      "type": "number",
      "default": 0
    },
    "maxValue": {
      "type": "number",
      "default": 100
    },
    "step": {
      "type": "number",
      "default": 1
    },
    "orientation": {
      "type": "string",
      "enum": [
        "horizontal",
        "vertical"
      ],
      "default": "horizontal"
    },
    "length": {
      "type": "number",
      "default": 192,
      "description": "units: px"
    },
    "isDisabled": {
      "type": "boolean",
      "default": false
    },
    "state": {
      "type": "string",
      "enum": [
        "default",
        "hover",
        "down",
        "keyboard focus"
      ],
      "default": "default"
    }
  }
}
← Back to home