Spectrum Components API

Schema version: 6.0.0

Slider

Sliders allow users to quickly select a value within a range. They should be used when the upper and lower bounds to the range are invariable.

PropertyValuesDefault valueRequired
label
text
-
label position
top / side
top
value
yes / no
nono
min value
yes / no
nono
max value
yes / no
nono
is range
yes / no
If true, the slider will allow selection of a range of values by displaying two handles.
no
step
yes / no
nono
value format
text
This will vary depending on implementation.
-
progression scale
linear / log
linear
width
yes / no
nono
has fill
yes / no
no
fill start
yes / no
nono
has gradient
yes / no
no
is editable
yes / no
no
is disabled
yes / no
no
state
default / hover / down / keyboard focus
default
{
  "slug": "slider",
  "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/component.json",
  "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/components/slider.json",
  "title": "Slider",
  "description": "Sliders allow users to quickly select a value within a range. They should be used when the upper and lower bounds to the range are invariable.",
  "meta": {
    "category": "inputs",
    "documentationUrl": "https://spectrum.adobe.com/page/slider/"
  },
  "type": "object",
  "properties": {
    "label": {
      "type": "string"
    },
    "labelPosition": {
      "type": "string",
      "default": "top",
      "enum": [
        "top",
        "side"
      ]
    },
    "value": {
      "type": "number",
      "description": "from minValue to maxValue"
    },
    "minValue": {
      "type": "number",
      "default": 0
    },
    "maxValue": {
      "type": "number",
      "default": 100
    },
    "isRange": {
      "type": "boolean",
      "default": false,
      "description": "If true, the slider will allow selection of a range of values by displaying two handles."
    },
    "step": {
      "type": "number",
      "default": 1
    },
    "valueFormat": {
      "type": "string",
      "description": "This will vary depending on implementation."
    },
    "progressionScale": {
      "type": "string",
      "enum": [
        "linear",
        "log"
      ],
      "default": "linear"
    },
    "width": {
      "type": "number"
    },
    "hasFill": {
      "type": "boolean",
      "default": false
    },
    "fillStart": {
      "type": "number",
      "default": 0
    },
    "hasGradient": {
      "type": "boolean",
      "default": false
    },
    "isEditable": {
      "type": "boolean",
      "default": false
    },
    "isDisabled": {
      "type": "boolean",
      "default": false
    },
    "state": {
      "type": "string",
      "enum": [
        "default",
        "hover",
        "down",
        "keyboard focus"
      ],
      "default": "default"
    }
  }
}
← Back to home