Slider

[中文]

Overview

slider represents a draggable numeric node.

Exclusive Props

Common Events

  • valueChanged

  • pressed

  • released

Part Style

  • partStyles.indicator: the selected track; configurable bgColor, bgGradientColor, bgGradientDirection

  • partStyles.knob: the drag handle; configurable normal style and stateStyles.pressed

Example

"partStyles": {
    "indicator": {
        "bgColor": "#2563eb",
        "bgGradientColor": "#38bdf8",
        "bgGradientDirection": "horizontal"
    },
    "knob": {
        "style": {"bgColor": "#ffffff", "radius": "12dp"},
        "stateStyles": {"pressed": {"bgColor": "#dbeafe"}}
    }
}