Skip to main content
Version: Next

Slider

Overview​

The Slider component is a highly customizable input element that allows users to select a value within a range. Built with Radix UI and Framer Motion, it offers various styles, animations, and interactive features.

Preview​

50%

Installation​

npx @mindfiredigital/ignix-ui add slider

Usage​

Import the component:

import { Slider } from './components/ui';

Basic Usage​

function BasicSlider() {
const [value, setValue] = useState([50]);

return (
<Slider
value={value}
onValueChange={setValue}
max={100}
step={1}
/>
);
}

Variants​

50%

Custom Range Values​

Create a slider with custom range and step values:

<Slider
defaultValue={[0]}
min={-50}
max={50}
step={5}
showValue
valuePrefix="Temperature: "
valueSuffix="°C"
/>