doc-burger

Slider

A component allowing data entry by way of sliding cursor in a range

A slider component allows users to input data within a specified range by dragging a cursor along a track, providing options for customization and control over its behavior and appearance.

slider component of Peaka

Key Features

Slider components offer the following key features:

  • Data Entry: Users can input data within a specified range by dragging the slider cursor.

  • Value: Sets the initial value of the slider. If a value is set, users cannot change the slider's position.

  • Label: Display a label above the slider to provide context for users.

  • Hint: Add a hint below the slider to offer additional guidance.

  • Min Value: Specify the minimum value of the slider's range.

  • Max Value: Define the maximum value of the slider's range.

  • Step: Set the step size for incremental changes when users interact with the slider.

  • Vertical: When enabled, the slider appears vertically instead of horizontally.

  • Disabled: Make the slider unchangeable and prevent user interaction by turning the "Disabled" switch on.

  • Styles: Customize the initial styles of the slider to align with your application's design.

How to Use Sliders

To use slider components in your application, follow these steps:

  1. Data Entry: Utilize slider components to allow users to input data within a specific range. Users can slide the cursor to select the desired value.

  2. Vertical Slider: If needed, enable the "Vertical" switch to display the slider vertically instead of horizontally.

  3. Disabled State: Use the "Disabled" switch to make the slider unchangeable when necessary.

Use Cases

Slider components are commonly used in various scenarios, including:

  • Volume control: Leverage sliders to allow users to adjust audio volume in media players or applications.

  • Brightness adjustment: Use sliders for controlling screen brightness in settings or multimedia applications.

  • Data Range selection: Enable users to select values within a specified range, such as date ranges or price ranges.

  • User preferences: Utilize sliders in preference panels to allow users to set preferences for various settings.

Slider components enhance user interactions by providing an intuitive way to input data within a defined range, improving the usability of your application.