Maxwell Barvian

Number Input

Forms 98

About

Number Input by NumberFlow

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

Code

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

Usage.tsx

import { useState } from "react"
import { Input } from "@/components/ui/number-input"

function BasicExample() {
  const [value, setValue] = useState(0)
  return (
    <div className="space-y-2">
      <Input 
        value={value} 
        onChange={setValue}
      />
    </div>
  )
}

function WithMinMax() {
  const [value, setValue] = useState(0)
  return (
    <div className="space-y-2">
      <Input value={value} onChange={setValue} min={0} max={10} />
      <p className="text-sm text-zinc-500">Min: 0, Max: 10</p>
    </div>
  );
}

export default {
  BasicExample,
  WithMinMax,
}

Dependencies

More by Maxwell Barvian

View all
  • Number Flow

    Number Flow

    574
  • Slider Number Flow

    Slider Number Flow

    529
  • Activity with Number Flow

    Activity with Number Flow

    128
  • Number Flow Trends

    Number Flow Trends

    4

More in Forms

View all
  • Premium Auth

    Premium Auth

    593
  • Contact Form

    Contact Form

    28
  • Form

    Form

    4
  • Login 1

    Login 1

    70
  • Book A Demo 1

    Book A Demo 1

    94
  • Contact Card

    Contact Card

    1.1K
  • HeroUI Field Error

    HeroUI Field Error

    13
  • Form [react-aria-components]

    Form [react-aria-components]

    19