Skip to content

    Browse components

    Trail Range

    A range slider whose thumb drags a glowing wake behind it and squashes when flicked fast. Built on a native range input, so keyboard and forms just work.

    Open
    Customize

    Installation

    npx shadcn@latest add @glint-ui/trail-range

    First time using @glint-ui? Add the registry to components.json once, or install by URL: npx shadcn@latest add https://glintui.vercel.app/r/trail-range.json

    Usage

    import { TrailRange } from "@/components/ui/trail-range";
    
    <TrailRange label="Volume" value={volume} onChange={setVolume} />

    Props

    PropTypeDefaultDescription
    labelstring"Volume"Visible label.
    defaultValuenumber40Starting value (uncontrolled).
    minnumber0Minimum.
    maxnumber100Maximum.
    stepnumber1Step size.
    colorstring"#38bdf8"Wake and thumb color.
    trailnumber0.6How long the wake lingers behind the thumb.
    showValuebooleantrueShow the current value.
    disabledbooleanfalseDisable the slider.
    valueReactNode—Controlled value; pair with onChange(value).
    classNamestring—Extra classes for the root element.