Skip to content

Range Input ​

The catnip-range-input custom element lets users choose a numeric value within a known range. It uses the same integrated label and supporting-text patterns as Input, Number Input, and the shared Inputs overview.

Overview ​

  • Value (v-model): model-value / .modelValue is a number.
  • Bounds: min and max define the selectable range. Defaults are 0 and 100.
  • Step: step controls keyboard and pointer increments. Default is 1.
  • Sizes: size supports m and l, matching the available Figma variants.
  • Native control: The component uses input[type="range"] internally, so pointer, touch, and keyboard behaviour follow the platform.
  • Value tooltip: The current value appears above the thumb while the slider is hovered, focused, or being dragged. Set showValueTooltip to keep it visible at all times.
  • Validation copy: The component does not generate error messages. Consumers pass dynamic validation copy through supportingText and set intent to match the state.
  • Forms: The current numeric value is submitted when name is set.

Live example ​

Guidelines ​

Use catnip-range-input when a value is best chosen by relative position inside a bounded range, for example percentages, volume, confidence, or intensity.

Behaviour ​

  • Use clear min, max, and step values. Avoid a range input when the exact value is more important than the relative position; use Number Input instead.
  • Choose size="m" or size="l" according to the surrounding field density. Range Input does not provide an S variant.
  • Keep labels visible. A range without a label is difficult to understand, especially when several sliders appear together.
  • Use show-min-max-labels when the endpoints help users interpret the scale.
  • Use show-value-tooltip only when the exact value should remain visible at rest. Otherwise the component shows the value while hovered, focused, or dragged, which covers mouse, keyboard, touch, and pointer interaction without adding constant visual noise.
  • Use show-input-field only when users may need to enter an exact value.

Intents and status ​

The intent prop matches other field components: neutral, warning, danger, and success. It is reflected in supporting text and the optional value input, while the slider track and thumb remain neutral/primary.

Validation messages are consumer-owned. When a value violates a product rule, set intent="danger" and pass the same dynamic copy through supportingText. The component will expose that supporting text through aria-describedby, but it will not create, replace, or translate the message for you.

Catnip Design System by Signicat