About
A numeric input field with increment/decrement stepper buttons that wraps a native number input, enforcing min/max/step constraints and showing label, description and error text.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Number Field to your project and fits it to your theme.
Code
How Number Field is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import NumberField from "@/components/ui/number-field";
export default function NumberFieldDemo() {
return (
<div className="flex min-h-[320px] w-full items-center justify-center p-10">
<NumberField
label="Quantity"
defaultValue={1}
min={0}
max={10}
description="How many would you like?"
errorMessage="Enter a value between 0 and 10."
/>
</div>
);
}
















