About
A Number field component built with React Aria and Tailwind CSS. Create input fields for numeric values with different formatting options and increment and decrement buttons.
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
"use client"
import { FieldDescription, FieldLabel, Input, NumberField, NumberFieldAction, NumberFieldGroup } from "@/components/ui/tailgrids-number-field"
import { Minus, Plus } from "@tailgrids/icons"
export default function FieldWithNumberFieldPreview() {
return (
<div className="mx-auto">
<NumberField defaultValue={1000}>
<FieldLabel>Quantity</FieldLabel>
<NumberFieldGroup>
<Input placeholder="0" className="px-13" />
<NumberFieldAction slot="decrement">
<Minus />
</NumberFieldAction>
<NumberFieldAction slot="increment">
<Plus />
</NumberFieldAction>
</NumberFieldGroup>
<FieldDescription>Enter a quantity between 0 and 100.</FieldDescription>
</NumberField>
</div>
);
}
















