Number Field

A number field allows a user to enter a number and increment or decrement the value using stepper buttons.

Installation

bash
npx sigma-ui@latest add number-field

Usage

vue
<script setup lang="ts">
import {
  NumberField,
  NumberFieldContent,
  NumberFieldDecrement,
  NumberFieldIncrement,
  NumberFieldInput,
} from '@/lib/registry/tailwind/ui/number-field'
import { Label } from '@/lib/registry/tailwind/ui/label'
</script>

<template>
  <NumberField>
    <Label>Age</Label>
    <NumberFieldContent>
      <NumberFieldDecrement />
      <NumberFieldInput />
      <NumberFieldIncrement />
    </NumberFieldContent>
  </NumberField>
</template>

Examples

Default

Disabled

Decimal

Percentage

Currency

Form

Enter value between 10 and 5000.

Edit this page on GitHub