A draggable control for selecting a numeric value or range within defined bounds. Supports single value and range selection, tick marks, custom value formatting, and vertical orientation. Use it when users need to explore a continuous range, such as volume, price, or percentage. Under a finger, on any touch device, it tracks as UISlider does: only the thumb takes a drag, through a target larger than it, the value follows the finger’s travel rather than jumping to it, a release coasts on before `onChangeEnd`, a swipe from the track scrolls the page, and a tap on the track or a mark sets the value when the finger lifts (the thumb springs there). A mouse drag on a thumb tracks the same way, past the same 10 px in any direction, with no lift or coast; a mouse press on the track moves the thumb there, and only a primary click presses. A pen drags as a finger does, claiming only along the track, and its drag ends at the release with no coast. A wheel or a trackpad scroll over the slider goes to whatever scrolls under it. Astryx by Meta. Source: https://astryx.atmeta.com/components/Slider
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Astryx Slider to your project and fits it to your theme.
Code
How Astryx Slider is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
'use client';
/* Copyright (c) 2026 Meta Platforms, Inc. See MIT notice in astryx-slider.tsx. */
import '@/components/ui/astryx-slider-utils/astryx-preview.css';
import {useState} from 'react';
import {Slider} from '@/components/ui/astryx-slider';
function OfficialSample() {
const [value, setValue] = useState(50);
return (
<Slider
containerStyle={{width: '100%'}}
label="Volume"
value={value}
onChange={setValue}
marks={[
{value: 0, label: '0'},
{value: 25, label: '25'},
{value: 50, label: '50'},
{value: 75, label: '75'},
{value: 100, label: '100'},
]}
/>
);
}
export default function Demo() {
return (
<div className="astryx-demo" data-astryx-theme="neutral" data-theme="light">
<div className="astryx-demo-content" data-centered style={{maxWidth: 380}}>
<OfficialSample />
</div>
</div>
);
}















