TailGrids

Number Field

Forms

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>
  );
}

Dependencies

More by TailGrids

View all
  • Text Field

    Text Field

  • Spinner

    Spinner

  • Breadcrumbs

    Breadcrumbs

  • Radio Button

    Radio Button

  • Field

    Field

  • Social Login Buttons

    Social Login Buttons

  • Link

    Link

  • Textarea

    Textarea

More in Forms

View all
  • Form

    Form

    7
  • Login 2

    Login 2

    16
  • Contact Form

    Contact Form

    33
  • Contact Card

    Contact Card

    1.1K
  • Book A Demo 1

    Book A Demo 1

    95
  • Premium Auth

    Premium Auth

    614
  • Onboarding Stepper

    Onboarding Stepper

    13
  • Authentication Card

    Authentication Card

    52