Rokkit Logo 1.0.0-next.122

Range

A range input that allows users to select a value from a range.

Introduction

Range input can be used to select a value between two values. The value can be changed by using the mouse or keyboard navigation.

Notable features:

  • Mouse and keyboard interaction support
  • Customizable min, max, and step values
  • Optional tick marks and labels
  • Accessible with proper ARIA attributes
  • Smooth animations and visual feedback

Basic Example

Here's a simple example of a Range component. Drag the handle or use arrow keys to change the value:

No preview available
No tabs available.

Properties

The Range component provides several properties to customize its behavior and appearance.

Core Properties

  • value: Current selected value of the range
  • min: Minimum value of the range (default: 0)
  • max: Maximum value of the range (default: 100)
  • steps: Step size of the range (default: 0 for continuous)

Visual Properties

  • tickStep: Step size of tick marks (default: no ticks)
  • labelSkip: Number of labels to skip (default: 0)
  • class: Custom CSS classes for styling

Here's the basic property configuration:

Highlighting code...

Tick Marks

You can add visual tick marks to help users understand the scale of the range. Tick marks can be configured with custom step sizes.

No preview available
No tabs available.

Configure tick marks using the tickStep property:

Highlighting code...

Labels

Labels can be displayed at regular intervals to show specific values along the range. You can control label frequency with the labelSkip property.

No preview available
No tabs available.

Configure labels with appropriate skipping:

Highlighting code...

Ready for more?

Now that you understand how the Range component works, explore other input components like Rating and Calendar, or learn about form integration.

Rating → Input Field →