Documentation

Support

Unity Studio

Open Unity Studio

Unity Studio

Slider

Add a slider to your User Interface (UI).
Read time 1 minuteLast updated 2 days ago

Use the Slider element to create a slider control that users can drag to select a value from a range in your User Interface (UI). This is useful for settings like volume control, brightness adjustment, or any other adjustable parameter. You can also use sliders to create progress bars that indicate the completion status of a task.

Slider properties

The following properties are available for you to customize in the slider's Inspector panel:

Property

Description

InteractableEnable to allow the user to interact with the slider. Disable to prevent interaction, which means the slider doesn't respond to user input.
Fill RectAssign an object that contains a RectTransform component (such as an Image) to visually represent the slider's fill area (the filled part of the slider).
Handle RectAssign an object that contains a RectTransform component (such as an Image) to visually represent the slider's handle.
DirectionSet the fill direction of the slider:
  • Left To Right: Starts at the left wih no fill and fills to the right as the value increases.
  • Right To Left: Starts at the right with no fill and fills to the left as the value increases.
  • Top To Bottom: Starts at the top with no fill and fills to the bottom as the value increases.
  • Bottom To Top: Starts at the bottom with no fill and fills to the top as the value increases.
Min ValueSet the minimum value of the slider.
Max ValueSet the maximum value of the slider.
Whole NumbersEnable to restrict the slider to whole number values only. Disable to allow decimal values.
ValueSet the current value of the slider.

Additional resources