pacekit

Motion Slider

Component

About

A range slider input with spring-physics thumb scaling and animated fill, built on Base UI's slider primitive and Motion.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Motion Slider to your project and fits it to your theme.

Code

How Motion Slider is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import * as React from "react";

import { Slider } from "@/components/ui/motion-slider";

export default function MotionSliderDemo() {
  const [value, setValue] = React.useState([50]);

  return (
    <div className="flex w-full max-w-sm flex-col gap-3">
      <div className="flex items-center justify-between">
        <span className="text-sm font-medium">Volume</span>
        <span className="text-muted-foreground text-sm tabular-nums">
          {value[0]}%
        </span>
      </div>
      <Slider value={value} onValueChange={setValue} />
    </div>
  );
}

Dependencies

More by pacekit

View all
  • AI Response Writer

    AI Response Writer

    364
  • Mouse Wave Text

    Mouse Wave Text

    23
  • Bouncing Text

    Bouncing Text

    23
  • Gradient Shadow

    Gradient Shadow

    16
  • Scramble Text

    Scramble Text

    15
  • AI Suggestions

    AI Suggestions

    9
  • Squash Text

    Squash Text

    8
  • Custom Tooltip Label Chart

    Custom Tooltip Label Chart