Animated React form components

Amount slider

Drag the grip thumb and the amount rolls like an odometer while the monthly payment works itself out. Pull past the end and the thumb stretches like rubber.

Forms, drag, Motion

Install

npm i clsx lucide-react motion tailwind-merge && curl -o components/amount-slider.tsx https://motion-brew.com/r/amount-slider.tsx

One self contained file for React and Tailwind CSS: amount-slider.tsx. Or ask your AI agent to add it through the MCP server.

Usage

import { AmountSlider } from "@/components/amount-slider";

export default function Page() {
  return (
    <AmountSlider
      min={5000}
      max={500000}
      step={1000}
      defaultValue={75000}
      onSubmit={(amount) => startApplication(amount)}
    />
  );
}

Props

PropTypeDefaultDescription
labelstring"How much do you need?"Label above the amount
minnumber5000Lowest amount
maxnumber500000Highest amount
stepnumber1000Amounts snap to this step
defaultValuenumber75000Starting amount
currencystring"USD"ISO currency code
ratenumber7.5Yearly rate in percent, for the estimate
monthsnumber60Term in months, for the estimate
ctastring"Continue"Button label
onChange(value) => voidCalled as the amount changes
onSubmit(value) => voidCalled when the button is pressed
classNamestringPlacement

More forms

  • AI prompt input: A composer for an AI assistant: a growing field with rolling placeholders, file chips, a model picker, web search, voice with a rippling particle ring, and a send that launches into a shimmering working state.
  • Payment form: Card details with a focus ring that glides between fields, floating labels, card network logos and a lock that snaps shut, ending on a sealed confirmation.
  • Verify flow: Connect, check, verified: a segmented bar fills, a highlight slides down the checks as each one passes, and a green seal bursts in when you are connected.
  • Morph search: A search pill that lifts into a card.

All animated react form components