Rendyn

Component library

189 components

Interaction

Range Slider

Range Slider presents a constrained numeric choice with optional step ticks.

React Tailwind CSS

Practical React example

Adjust a numeric preference within explicit lower and upper bounds.

Before you copy and paste

Keep the example in the React rendering environment required by the imported component. Copy components/motion/range-slider.tsx and its returned support files from the Code tab; preserve the project-relative paths.

Listed package dependencies: clsx, motion, react, tailwind-merge.

Use the Code tab for the component files and installation instructions, then adapt the imports in this example to your project.

Adjust a numeric preference within explicit lower and upper bounds

// Usage adapted from beUI's pinned MIT source.
// Copyright (c) 2026 Saurabh Chauhan. See ./LICENSES.md.
"use client";

import { useState } from "react";

import { RangeSlider } from "@/components/motion/range-slider";

export function RangeSliderPreview() {
  const [value, setValue] = useState(40);

  return (
    <div className="flex w-full max-w-sm flex-col gap-3">
      <div className="flex items-center justify-between text-sm text-muted-foreground">
        <span>Drag the handle</span>
        <span className="tabular-nums text-foreground">{value}</span>
      </div>
      <RangeSlider value={value} onValueChange={setValue} step={5} aria-label="Value" />
    </div>
  );
}

Usage example adapted from beUI's pinned MIT source. Retain the source licence notices when copying.

Keep the value in the parent when it changes another view. Choose step and bounds in the same unit as the stored value and explain that unit next to the control.

Customization

RangeSliderProps.showTicks
Optional; boolean. Render a tick dot at each step.
RangeSliderProps.className
Optional; string.

Integration notes

  • Validate the accepted range again when saving the setting.
  • Provide a keyboard path and a readable current value; dragging must not be the only way to understand the setting.

Component source: beUI documentation . These examples describe the version imported into Rendyn. Upstream APIs may have changed; retain the source licence notices when adapting the code.

Better with your agent

Give your agent taste.

The best way to use Rendyn is through MCP. Let your agent find the right component, compare previews and bring the source into your project.

All components are free. Sign up only to connect MCP.

Connect to MCP