Skip to content

SliderProperties

export type SliderProperties = {
    HandleSize: CanBeState<UDim2>?,
    Enabled: CanBeState<boolean>?,
    OnChange: ((newValue: number) -> nil)?,
    Value: CanBeValue<number>?,
    Min: CanBeState<number>,
    Max: CanBeState<number>,
    Step: CanBeState<number>,
    [any]: any,
}

The SliderProperties table that is given to the Slider() function that contains data about the desired Slider.


Properties

HandleSize : CanBeState<UDim2>?

Sets the size of the handle on the Slider. Can either be a State containing an UDim2, or an UDim2.


Enabled : CanBeState<boolean>?

Sets whether the Slider will be enabled or not. Can either be a State containing a boolean, or a boolean.


OnChange : ((newValue: number) -> nil)?

The callback function that will be called when the Slider's value changes.


Value : CanBeValue<number>?

The initial value of the Slider. Can either be a Value containing a number, or a number.


Min : CanBeState<number>

The minimum number that the handle can be moved to. Can either be a State containing a number, or a number.


Max : CanBeState<number>

The maximum number that the handle can be moved to. Can either be a State containing a number, or a number.


Step : CanBeState<number>,

Determines how much the drag will be set to the Slider's handle. Can either be a State containing a number, or a number.