- Accordion new
- ActionSheet new
- Alert new
- Alert Dialog new
- Angle Slider new
- Autocomplete new
- Avatar new
- Badge new
- Breadcrumb new
- Button new
- Button Group new
- Card new
- Carousel new
- Checkbox new
- Clipboard new
- Collapsible new
- Color Picker new
- Date Input new
- Date Picker new
- Dialog new
- DialogCaller new
- Drawer beta
- Editable new
- Empty new
- Field new
- Fieldset new
- File Upload new
- Filters new
- Floating Panel new
- Hover Card new
- Image new
- Image Cropper new
- Input new
- Input Group new
- Json Tree View new
- Kbd new
- Listbox new
- Marquee new
- Menu new
- Number Input new
- Pagination new
- Password Input new
- PhoneField new
- Pin Input new
- Popover new
- Progress Circular new
- Progress Linear new
- Qr Code new
- Radio Group new
- Rating Group new
- Scroll Area new
- ScrollSpy new
- Segment Group new
- Select new
- Separator new
- Sidebar new
- Signature Pad new
- Skeleton new
- Slider new
- Splitter new
- Steps new
- Switch new
- Table new
- Tabs new
- Tags Input new
- Textarea new
- Timeline new
- Timer new
- Toast new
- Toc new
- Toggle new
- Toggle Group new
- Tooltip new
- Tour new
- Tree View new
- Typography new
Number Input
Vue number input with steppers, min and max bounds, and precise numeric entry for forms.
Installation
Install from the Vuzeno registry:
bunx --bun shadcn-vue@latest add https://vuzeno.com/r/number-input.json
npx shadcn-vue@latest add https://vuzeno.com/r/number-input.json
yarn dlx shadcn-vue@latest add https://vuzeno.com/r/number-input.json
pnpm dlx shadcn-vue@latest add https://vuzeno.com/r/number-input.json
Usage
<script setup lang="ts">
import { NumberInput } from "@/components/ui/number-input";
</script>
<template>
<NumberInput.Root>
<!-- … -->
</NumberInput.Root>
</template>
Composition
NumberInput.Root
├── NumberInput.Label
├── NumberInput.Control layout="inset" | "segmented"
│ ├── NumberInput.Scrubber optional
│ ├── NumberInput.Input
│ ├── NumberInput.TriggerGroup optional — stacked steppers (inset only)
│ │ ├── NumberInput.IncrementTrigger
│ │ └── NumberInput.DecrementTrigger
│ ├── NumberInput.IncrementTrigger split steppers — left (+)
│ └── NumberInput.DecrementTrigger split steppers — right (−)
├── NumberInput.Context
├── NumberInput.RootProvider
└── NumberInput.ValueText
Layout
NumberInput.Control accepts a layout prop to coordinate styles across parts:
inset(default) — bordered input with steppers overlaid inside the field. UseTriggerGroupto stack increment/decrement on the right.segmented— flex row with a shared border onControl. Order: optionalScrubber,IncrementTrigger(+),Input,DecrementTrigger(−). The value is centered between the two triggers.
Padding and focus rings are derived from the chosen layout and child parts — no manual attributes on Input are required.
Examples
Split Controls
Use layout="segmented" on Control. Place IncrementTrigger on the left, DecrementTrigger on the right, and optionally add a Scrubber before the increment trigger.
Min and Max
Pass the min prop or max prop to set an upper and lower limit for the input. By default, the input will restrict the value to stay within the specified range.
Precision
In some cases, you might need the value to be rounded to specific decimal points. Set the formatOptions and provide Intl.NumberFormatOptions such as maximumFractionDigits or minimumFractionDigits.
Scrubbing
The NumberInput supports the scrubber interaction pattern. To use this pattern, render the NumberInput.Scrubber component. It uses the Pointer lock API and tracks the pointer movement. It also renders a virtual cursor which mimics the real cursor's pointer.
Mouse Wheel
The NumberInput exposes a way to increment/decrement the value using the mouse wheel event. To activate this, set the allowMouseWheel prop to true.
Formatting
To apply custom formatting to the input's value, set the formatOptions and provide Intl.NumberFormatOptions such as style and currency.
Field
The Field component helps manage form-related state and accessibility attributes of a number input. It includes handling ARIA labels, helper text, and error text to ensure proper accessibility.
Root Provider
An alternative way to control the number input is to use the RootProvider component and the useNumberInput hook. This way you can access the state and methods from outside the component.
API
See Ark UI Number Input docs for full props and examples.