GitHub

Slider

Range input with tooltips, custom ranges, and model binding.

<rhx-slider>

Examples

Basic

Custom Range

With Tooltip

With Hint

0 = fully transparent, 100 = fully opaque

Sizes

States

Model Binding

htmx Integration

The quick brown fox jumps over the lazy dog.

Properties

Property Type Default Description
rhx-for ModelExpression - ASP.NET Core model expression for two-way binding
name string - The form field name
value string - The current value
rhx-label string - Label text displayed above the slider
rhx-hint string - Hint text displayed below the slider
rhx-min string 0 Minimum value
rhx-max string 100 Maximum value
rhx-step string 1 Step increment
rhx-tooltip string - Tooltip position: top, bottom
rhx-size string medium Slider size: small, medium, large
rhx-disabled bool false Whether the slider is disabled

Accessibility

  • Renders a native <input type="range"> element with full keyboard support.
  • Sets aria-valuemin, aria-valuemax, and aria-valuenow automatically.
  • Label is associated with the input via for/id pairing.
  • Keyboard arrow keys adjust the value by the configured step increment.